Package org.firebirdsql.management
Class FBServiceManager
- java.lang.Object
- 
- org.firebirdsql.management.FBServiceManager
 
- 
- All Implemented Interfaces:
- ServiceManager
 - Direct Known Subclasses:
- FBBackupManagerBase,- FBMaintenanceManager,- FBNBackupManager,- FBStatisticsManager,- FBTraceManager,- FBUserManager
 
 public class FBServiceManager extends java.lang.Object implements ServiceManager An implementation of the basic Firebird Service API functionality.- Author:
- Roman Rokytskyy, Mark Rotteveel
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intBUFFER_SIZE
 - 
Constructor SummaryConstructors Constructor Description FBServiceManager()Create a new instance ofFBServiceManagerbased on the default GDSType.FBServiceManager(java.lang.String gdsType)Create a new instance ofFBServiceManagerbased on a given GDSType.FBServiceManager(GDSType gdsType)Create a new instance ofFBServiceManagerbased on a given GDSType.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected FbDatabaseattachDatabase()FbServiceattachServiceManager()protected ServiceRequestBuffercreateRequestBuffer(FbService service, int operation, int options)protected voidexecuteServicesOperation(FbService service, ServiceRequestBuffer srb)protected voidexecuteServicesOperation(ServiceRequestBuffer srb)Deprecated.java.lang.StringgetAuthPlugins()Get the list of authentication plugins to try.java.lang.StringgetCharSet()java.lang.StringgetDatabase()Returns the database path for the connection to the service manager.java.lang.StringgetDbCryptConfig()Get the database encryption plugin configuration.java.lang.StringgetHost()Returns the host for the connection to the service manager.java.io.OutputStreamgetLogger()Returns the logger for the connection to the service manager.java.lang.StringgetPassword()Returns the password for the connection to the service manager.intgetPort()Returns the port for the connection to the service manager.GDSServerVersiongetServerVersion()Obtains the server version through a service call.java.lang.StringgetServiceName()java.lang.StringgetUser()Get name of the user that performs the operation.WireCryptgetWireCrypt()Get the wire encryption level.booleanisWireCompression()Get if wire compression should be enabled.voidqueueService(FbService service)voidsetAuthPlugins(java.lang.String authPlugins)Sets the authentication plugins to try.voidsetCharSet(java.lang.String charSet)Sets the encoding used for encoding or decoding string values.voidsetDatabase(java.lang.String database)Sets the database path for the connection to the service manager.voidsetDbCryptConfig(java.lang.String dbCryptConfig)Sets the database encryption plugin configuration.voidsetHost(java.lang.String host)Sets the host for the connection to the service manager.voidsetLogger(java.io.OutputStream logger)Sets the logger for the connection to the service manager.voidsetPassword(java.lang.String password)Sets the password for the connection to the service manager.voidsetPort(int port)Sets the port for the connection to the service manager.voidsetUser(java.lang.String user)Set the name of the user that performs the operation.voidsetWireCompression(boolean wireCompression)Sets if the connection should try to enable wire compression.voidsetWireCrypt(WireCrypt wireCrypt)Set the wire encryption level.
 
- 
- 
- 
Field Detail- 
BUFFER_SIZEpublic static final int BUFFER_SIZE - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
FBServiceManagerpublic FBServiceManager() Create a new instance ofFBServiceManagerbased on the default GDSType.
 - 
FBServiceManagerpublic FBServiceManager(java.lang.String gdsType) Create a new instance ofFBServiceManagerbased on a given GDSType.- Parameters:
- gdsType- type must be PURE_JAVA, EMBEDDED, or NATIVE
 
 - 
FBServiceManagerpublic FBServiceManager(GDSType gdsType) Create a new instance ofFBServiceManagerbased on a given GDSType.- Parameters:
- gdsType- The GDS implementation type to use
 
 
- 
 - 
Method Detail- 
setCharSetpublic void setCharSet(java.lang.String charSet) Description copied from interface:ServiceManagerSets the encoding used for encoding or decoding string values.If not set (or null), defaults to the value of system property file.encoding/- Specified by:
- setCharSetin interface- ServiceManager
- Parameters:
- charSet- Java charset name.
 
 - 
getCharSetpublic java.lang.String getCharSet() - Specified by:
- getCharSetin interface- ServiceManager
 
 - 
setUserpublic void setUser(java.lang.String user) Set the name of the user that performs the operation.- Specified by:
- setUserin interface- ServiceManager
- Parameters:
- user- name of the user.
 
 - 
getUserpublic java.lang.String getUser() Get name of the user that performs the operation.- Specified by:
- getUserin interface- ServiceManager
- Returns:
- name of the user that performs the operation.
 
 - 
setPasswordpublic void setPassword(java.lang.String password) Description copied from interface:ServiceManagerSets the password for the connection to the service manager.- Specified by:
- setPasswordin interface- ServiceManager
- Parameters:
- password- The password to set.
 
 - 
getPasswordpublic java.lang.String getPassword() Description copied from interface:ServiceManagerReturns the password for the connection to the service manager.- Specified by:
- getPasswordin interface- ServiceManager
- Returns:
- Returns the password.
 
 - 
setDatabasepublic void setDatabase(java.lang.String database) Description copied from interface:ServiceManagerSets the database path for the connection to the service manager.- Specified by:
- setDatabasein interface- ServiceManager
- Parameters:
- database- path for the connection to the service manager.
 
 - 
getDatabasepublic java.lang.String getDatabase() Description copied from interface:ServiceManagerReturns the database path for the connection to the service manager.- Specified by:
- getDatabasein interface- ServiceManager
- Returns:
- the database path for the connection to the service manager.
 
 - 
getHostpublic java.lang.String getHost() Description copied from interface:ServiceManagerReturns the host for the connection to the service manager.- Specified by:
- getHostin interface- ServiceManager
- Returns:
- Returns the host.
 
 - 
setHostpublic void setHost(java.lang.String host) Description copied from interface:ServiceManagerSets the host for the connection to the service manager.- Specified by:
- setHostin interface- ServiceManager
- Parameters:
- host- The host to set.
 
 - 
getPortpublic int getPort() Description copied from interface:ServiceManagerReturns the port for the connection to the service manager.- Specified by:
- getPortin interface- ServiceManager
- Returns:
- Returns the port.
 
 - 
setPortpublic void setPort(int port) Description copied from interface:ServiceManagerSets the port for the connection to the service manager.- Specified by:
- setPortin interface- ServiceManager
- Parameters:
- port- The port to set.
 
 - 
getWireCryptpublic WireCrypt getWireCrypt() Description copied from interface:ServiceManagerGet the wire encryption level.- Specified by:
- getWireCryptin interface- ServiceManager
- Returns:
- Wire encryption level
 
 - 
setWireCryptpublic void setWireCrypt(WireCrypt wireCrypt) Description copied from interface:ServiceManagerSet the wire encryption level.- Specified by:
- setWireCryptin interface- ServiceManager
- Parameters:
- wireCrypt- Wire encryption level (- nullnot allowed)
 
 - 
getDbCryptConfigpublic java.lang.String getDbCryptConfig() Description copied from interface:ServiceManagerGet the database encryption plugin configuration.- Specified by:
- getDbCryptConfigin interface- ServiceManager
- Returns:
- Database encryption plugin configuration, meaning plugin specific
 
 - 
setDbCryptConfigpublic void setDbCryptConfig(java.lang.String dbCryptConfig) Description copied from interface:ServiceManagerSets the database encryption plugin configuration.- Specified by:
- setDbCryptConfigin interface- ServiceManager
- Parameters:
- dbCryptConfig- Database encryption plugin configuration, meaning plugin specific
 
 - 
getAuthPluginspublic java.lang.String getAuthPlugins() Description copied from interface:ServiceManagerGet the list of authentication plugins to try.- Specified by:
- getAuthPluginsin interface- ServiceManager
- Returns:
- comma-separated list of authentication plugins, or nullfor driver default
 
 - 
setAuthPluginspublic void setAuthPlugins(java.lang.String authPlugins) Description copied from interface:ServiceManagerSets the authentication plugins to try.Invalid names are skipped during authentication. - Specified by:
- setAuthPluginsin interface- ServiceManager
- Parameters:
- authPlugins- comma-separated list of authentication plugins, or- nullfor driver default
 
 - 
isWireCompressionpublic boolean isWireCompression() Description copied from interface:ServiceManagerGet if wire compression should be enabled.Wire compression requires Firebird 3 or higher, and the server must have the zlib library. If compression cannot be negotiated, the connection will be made without wire compression. This property will be ignored for native connections. For native connections, the configuration in firebird.confread by the client library will be used.- Specified by:
- isWireCompressionin interface- ServiceManager
- Returns:
- truewire compression enabled
 
 - 
setWireCompressionpublic void setWireCompression(boolean wireCompression) Description copied from interface:ServiceManagerSets if the connection should try to enable wire compression.- Specified by:
- setWireCompressionin interface- ServiceManager
- Parameters:
- wireCompression-- trueenable wire compression,- falsedisable wire compression (the default)
- See Also:
- ServiceManager.isWireCompression()
 
 - 
getLoggerpublic java.io.OutputStream getLogger() Description copied from interface:ServiceManagerReturns the logger for the connection to the service manager.- Specified by:
- getLoggerin interface- ServiceManager
- Returns:
- Returns the out.
 
 - 
setLoggerpublic void setLogger(java.io.OutputStream logger) Description copied from interface:ServiceManagerSets the logger for the connection to the service manager.- Specified by:
- setLoggerin interface- ServiceManager
- Parameters:
- logger- The out to set.
 
 - 
getServiceNamepublic java.lang.String getServiceName() 
 - 
attachServiceManagerpublic FbService attachServiceManager() throws java.sql.SQLException - Throws:
- java.sql.SQLException
 
 - 
attachDatabaseprotected FbDatabase attachDatabase() throws java.sql.SQLException - Throws:
- java.sql.SQLException
 
 - 
queueServicepublic void queueService(FbService service) throws java.sql.SQLException, java.io.IOException - Throws:
- java.sql.SQLException
- java.io.IOException
 
 - 
executeServicesOperation@Deprecated protected void executeServicesOperation(ServiceRequestBuffer srb) throws java.sql.SQLException Deprecated.Execute a Services API operation in the database. All output from the operation is sent to thisServiceManager's logger.- Parameters:
- srb- The buffer containing the task request
- Throws:
- java.sql.SQLException- if a database access error occurs or incorrect parameters are supplied
 
 - 
executeServicesOperationprotected final void executeServicesOperation(FbService service, ServiceRequestBuffer srb) throws java.sql.SQLException - Throws:
- java.sql.SQLException
 
 - 
createRequestBufferprotected ServiceRequestBuffer createRequestBuffer(FbService service, int operation, int options) 
 - 
getServerVersionpublic GDSServerVersion getServerVersion() throws java.sql.SQLException Description copied from interface:ServiceManagerObtains the server version through a service call.- Specified by:
- getServerVersionin interface- ServiceManager
- Returns:
- Parsed server version, or GDSServerVersion.INVALID_VERSIONif parsing failed.
- Throws:
- java.sql.SQLException- For errors connecting to the service manager.
 
 
- 
 
-