Return the instance of the FDB API singleton. This method will always return a non-null value for the singleton, but if the #selectAPIVersion(int) selectAPIVersion() method has not yet been called, it will throw an FDBException indicating that an API version has not yet b
()
| 150 | * @throws FDBException if {@link #selectAPIVersion(int) selectAPIVersion()} has not been called |
| 151 | */ |
| 152 | public static FDB instance() throws FDBException { |
| 153 | if(singleton != null) { |
| 154 | return singleton; |
| 155 | } |
| 156 | else { |
| 157 | throw new FDBException("API version is not set", 2200); |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | /** |
| 162 | * Select the version for the client API. An exception will be thrown if the |
no outgoing calls