org.firebirdsql.management
Class FBManager

java.lang.Object
  extended by org.firebirdsql.management.FBManager
All Implemented Interfaces:
FBManagerMBean

public class FBManager
extends java.lang.Object
implements FBManagerMBean

The class FBManager is a simple jmx mbean that allows you to create and drop databases. in particular, they can be created and dropped using the jboss service lifecycle operations start and stop.

Author:
David Jencks

Constructor Summary
FBManager()
           
FBManager(org.firebirdsql.gds.impl.GDSType type)
           
FBManager(java.lang.String type)
           
 
Method Summary
 void createDatabase(java.lang.String fileName, java.lang.String user, java.lang.String password)
           
 void dropDatabase(java.lang.String fileName, java.lang.String user, java.lang.String password)
           
 int getDialect()
           
 java.lang.String getFileName()
          mbean get-set pair for field fileName Get the value of fileName
 java.lang.String getName()
           
 java.lang.String getPassword()
          mbean get-set pair for field password Get the value of password
 int getPort()
           
 java.lang.String getServer()
           
 java.lang.String getState()
           
 java.lang.String getType()
           
 java.lang.String getUserName()
          mbean get-set pair for field userName Get the value of userName
 boolean isCreateOnStart()
          mbean get-set pair for field createOnStart Get the value of createOnStart
 boolean isDatabaseExists(java.lang.String fileName, java.lang.String user, java.lang.String password)
           
 boolean isDropOnStop()
          mbean get-set pair for field dropOnStop Get the value of dropOnStop
 boolean isForceCreate()
          Get the ForceCreate value.
 void setCreateOnStart(boolean createOnStart)
          Set the value of createOnStart
 void setDialect(int dialect)
          Sets the dialect.
 void setDropOnStop(boolean dropOnStop)
          Set the value of dropOnStop
 void setFileName(java.lang.String fileName)
          Set the value of fileName
 void setForceCreate(boolean forceCreate)
          Set the ForceCreate value.
 void setPassword(java.lang.String password)
          Set the value of password
 void setPort(int port)
           
 void setServer(java.lang.String host)
           
 void setType(java.lang.String type)
           
 void setUserName(java.lang.String userName)
          Set the value of userName
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FBManager

public FBManager()

FBManager

public FBManager(org.firebirdsql.gds.impl.GDSType type)

FBManager

public FBManager(java.lang.String type)
Method Detail

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface FBManagerMBean
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in interface FBManagerMBean
Throws:
java.lang.Exception

getState

public java.lang.String getState()
Specified by:
getState in interface FBManagerMBean

getName

public java.lang.String getName()
Specified by:
getName in interface FBManagerMBean

setServer

public void setServer(java.lang.String host)
Specified by:
setServer in interface FBManagerMBean

getServer

public java.lang.String getServer()
Specified by:
getServer in interface FBManagerMBean

setPort

public void setPort(int port)
Specified by:
setPort in interface FBManagerMBean

getPort

public int getPort()
Specified by:
getPort in interface FBManagerMBean

getFileName

public java.lang.String getFileName()
mbean get-set pair for field fileName Get the value of fileName

Specified by:
getFileName in interface FBManagerMBean
Returns:
value of fileName

getType

public java.lang.String getType()

setType

public void setType(java.lang.String type)

setFileName

public void setFileName(java.lang.String fileName)
Set the value of fileName

Specified by:
setFileName in interface FBManagerMBean
Parameters:
fileName - Value to assign to fileName

getUserName

public java.lang.String getUserName()
mbean get-set pair for field userName Get the value of userName

Specified by:
getUserName in interface FBManagerMBean
Returns:
value of userName

setUserName

public void setUserName(java.lang.String userName)
Set the value of userName

Specified by:
setUserName in interface FBManagerMBean
Parameters:
userName - Value to assign to userName

getPassword

public java.lang.String getPassword()
mbean get-set pair for field password Get the value of password

Specified by:
getPassword in interface FBManagerMBean
Returns:
value of password

setPassword

public void setPassword(java.lang.String password)
Set the value of password

Specified by:
setPassword in interface FBManagerMBean
Parameters:
password - Value to assign to password

setDialect

public void setDialect(int dialect)
Sets the dialect.

Parameters:
dialect - Database dialect (1 or 3)
Throws:
java.lang.IllegalArgumentException - if value is not 1 or 3

getDialect

public int getDialect()

isCreateOnStart

public boolean isCreateOnStart()
mbean get-set pair for field createOnStart Get the value of createOnStart

Specified by:
isCreateOnStart in interface FBManagerMBean
Returns:
value of createOnStart

setCreateOnStart

public void setCreateOnStart(boolean createOnStart)
Set the value of createOnStart

Specified by:
setCreateOnStart in interface FBManagerMBean
Parameters:
createOnStart - Value to assign to createOnStart

isDropOnStop

public boolean isDropOnStop()
mbean get-set pair for field dropOnStop Get the value of dropOnStop

Specified by:
isDropOnStop in interface FBManagerMBean
Returns:
value of dropOnStop

setDropOnStop

public void setDropOnStop(boolean dropOnStop)
Set the value of dropOnStop

Specified by:
setDropOnStop in interface FBManagerMBean
Parameters:
dropOnStop - Value to assign to dropOnStop

isForceCreate

public boolean isForceCreate()
Get the ForceCreate value.

Specified by:
isForceCreate in interface FBManagerMBean
Returns:
the ForceCreate value.

setForceCreate

public void setForceCreate(boolean forceCreate)
Set the ForceCreate value.

Specified by:
setForceCreate in interface FBManagerMBean
Parameters:
forceCreate - The new ForceCreate value.

createDatabase

public void createDatabase(java.lang.String fileName,
                           java.lang.String user,
                           java.lang.String password)
                    throws java.lang.Exception
Specified by:
createDatabase in interface FBManagerMBean
Throws:
java.lang.Exception

dropDatabase

public void dropDatabase(java.lang.String fileName,
                         java.lang.String user,
                         java.lang.String password)
                  throws java.lang.Exception
Specified by:
dropDatabase in interface FBManagerMBean
Throws:
java.lang.Exception

isDatabaseExists

public boolean isDatabaseExists(java.lang.String fileName,
                                java.lang.String user,
                                java.lang.String password)
                         throws java.lang.Exception
Specified by:
isDatabaseExists in interface FBManagerMBean
Throws:
java.lang.Exception


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