org.firebirdsql.management
Class FBServiceManager

java.lang.Object
  extended by org.firebirdsql.management.FBServiceManager
All Implemented Interfaces:
ServiceManager
Direct Known Subclasses:
FBBackupManager, 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

Field Summary
static int BUFFER_SIZE
           
 
Constructor Summary
protected FBServiceManager()
          Create a new instance of FBServiceManager based on the default GDSType.
protected FBServiceManager(org.firebirdsql.gds.impl.GDSType gdsType)
          Create a new instance of FBServiceManager based on a given GDSType.
protected FBServiceManager(java.lang.String gdsType)
          Create a new instance of FBServiceManager based on a given GDSType.
 
Method Summary
 IscSvcHandle attachServiceManager(GDS gds)
           
protected  ServiceRequestBuffer createRequestBuffer(int operation, int options)
          Build up a request buffer for the specified operation.
 void detachServiceManager(GDS gds, IscSvcHandle handle)
           
protected  void executeServicesOperation(ServiceRequestBuffer srb)
          Execute a Services API operation in the database.
 java.lang.String getDatabase()
          Returns the database path for the connection to the service manager.
 GDS getGds()
          Get GDS implementation depending on the type specified during instantiation.
 java.lang.String getHost()
          Returns the host for the connection to the service manager.
 java.io.OutputStream getLogger()
          Returns the logger for the connection to the service manager.
 java.lang.String getPassword()
          Returns the password for the connection to the service manager.
 int getPort()
          Returns the port for the connection to the service manager.
 java.lang.String getServiceName()
           
 java.lang.String getUser()
          Get name of the user that performs the operation.
 void queueService(GDS gds, IscSvcHandle handle)
           
 void setDatabase(java.lang.String database)
          Sets the database path for the connection to the service manager.
 void setHost(java.lang.String host)
          Sets the host for the connection to the service manager.
 void setLogger(java.io.OutputStream logger)
          Sets the logger for the connection to the service manager.
 void setPassword(java.lang.String password)
          Sets the password for the connection to the service manager.
 void setPort(int port)
          Sets the port for the connection to the service manager.
 void setUser(java.lang.String user)
          Set the name of the user that performs the operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFFER_SIZE

public static final int BUFFER_SIZE
See Also:
Constant Field Values
Constructor Detail

FBServiceManager

protected FBServiceManager()
Create a new instance of FBServiceManager based on the default GDSType.


FBServiceManager

protected FBServiceManager(java.lang.String gdsType)
Create a new instance of FBServiceManager based on a given GDSType.

Parameters:
gdsType - type must be PURE_JAVA, EMBEDDED, or NATIVE

FBServiceManager

protected FBServiceManager(org.firebirdsql.gds.impl.GDSType gdsType)
Create a new instance of FBServiceManager based on a given GDSType.

Parameters:
gdsType - The GDS implementation type to use
Method Detail

setUser

public void setUser(java.lang.String user)
Set the name of the user that performs the operation.

Specified by:
setUser in interface ServiceManager
Parameters:
user - name of the user.

getUser

public java.lang.String getUser()
Get name of the user that performs the operation.

Specified by:
getUser in interface ServiceManager
Returns:
name of the user that performs the operation.

setPassword

public void setPassword(java.lang.String password)
Description copied from interface: ServiceManager
Sets the password for the connection to the service manager.

Specified by:
setPassword in interface ServiceManager
Parameters:
password - The password to set.

getPassword

public java.lang.String getPassword()
Description copied from interface: ServiceManager
Returns the password for the connection to the service manager.

Specified by:
getPassword in interface ServiceManager
Returns:
Returns the password.

setDatabase

public void setDatabase(java.lang.String database)
Description copied from interface: ServiceManager
Sets the database path for the connection to the service manager.

Specified by:
setDatabase in interface ServiceManager
Parameters:
database - path for the connection to the service manager.

getDatabase

public java.lang.String getDatabase()
Description copied from interface: ServiceManager
Returns the database path for the connection to the service manager.

Specified by:
getDatabase in interface ServiceManager
Returns:
the database path for the connection to the service manager.

getHost

public java.lang.String getHost()
Description copied from interface: ServiceManager
Returns the host for the connection to the service manager.

Specified by:
getHost in interface ServiceManager
Returns:
Returns the host.

setHost

public void setHost(java.lang.String host)
Description copied from interface: ServiceManager
Sets the host for the connection to the service manager.

Specified by:
setHost in interface ServiceManager
Parameters:
host - The host to set.

getPort

public int getPort()
Description copied from interface: ServiceManager
Returns the port for the connection to the service manager.

Specified by:
getPort in interface ServiceManager
Returns:
Returns the port.

setPort

public void setPort(int port)
Description copied from interface: ServiceManager
Sets the port for the connection to the service manager.

Specified by:
setPort in interface ServiceManager
Parameters:
port - The port to set.

getLogger

public java.io.OutputStream getLogger()
Description copied from interface: ServiceManager
Returns the logger for the connection to the service manager.

Specified by:
getLogger in interface ServiceManager
Returns:
Returns the out.

setLogger

public void setLogger(java.io.OutputStream logger)
Description copied from interface: ServiceManager
Sets the logger for the connection to the service manager.

Specified by:
setLogger in interface ServiceManager
Parameters:
logger - The out to set.

getGds

public GDS getGds()
Get GDS implementation depending on the type specified during instantiation.

Returns:
instance of GDS.

getServiceName

public java.lang.String getServiceName()

attachServiceManager

public IscSvcHandle attachServiceManager(GDS gds)
                                  throws GDSException
Throws:
GDSException

detachServiceManager

public void detachServiceManager(GDS gds,
                                 IscSvcHandle handle)
                          throws GDSException
Throws:
GDSException

queueService

public void queueService(GDS gds,
                         IscSvcHandle handle)
                  throws GDSException,
                         FBSQLException,
                         java.io.IOException
Throws:
GDSException
FBSQLException
java.io.IOException

executeServicesOperation

protected void executeServicesOperation(ServiceRequestBuffer srb)
                                 throws FBSQLException
Execute a Services API operation in the database. All output from the operation is sent to this ServiceManager's logger.

Parameters:
srb - The buffer containing the task request
Throws:
FBSQLException - if a database access error occurs or incorrect parameters are supplied

createRequestBuffer

protected ServiceRequestBuffer createRequestBuffer(int operation,
                                                   int options)
Build up a request buffer for the specified operation.

Parameters:
operation - The isc_action_svc_* operation
options - The options bitmask for the request buffer


Copyright © 2001-2019 Jaybird (Firebird JDBC/JCA) team. All rights reserved.