public class FBManager extends java.lang.Object implements FBManagerMBean
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.Constructor and Description |
---|
FBManager() |
FBManager(org.firebirdsql.gds.impl.GDSType type) |
FBManager(java.lang.String type) |
Modifier and Type | Method and Description |
---|---|
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() |
public FBManager()
public FBManager(org.firebirdsql.gds.impl.GDSType type)
public FBManager(java.lang.String type)
public void start() throws java.lang.Exception
start
in interface FBManagerMBean
java.lang.Exception
public void stop() throws java.lang.Exception
stop
in interface FBManagerMBean
java.lang.Exception
public java.lang.String getState()
getState
in interface FBManagerMBean
public java.lang.String getName()
getName
in interface FBManagerMBean
public void setServer(java.lang.String host)
setServer
in interface FBManagerMBean
public java.lang.String getServer()
getServer
in interface FBManagerMBean
public void setPort(int port)
setPort
in interface FBManagerMBean
public int getPort()
getPort
in interface FBManagerMBean
public java.lang.String getFileName()
getFileName
in interface FBManagerMBean
public java.lang.String getType()
public void setType(java.lang.String type)
public void setFileName(java.lang.String fileName)
setFileName
in interface FBManagerMBean
fileName
- Value to assign to fileNamepublic java.lang.String getUserName()
getUserName
in interface FBManagerMBean
public void setUserName(java.lang.String userName)
setUserName
in interface FBManagerMBean
userName
- Value to assign to userNamepublic java.lang.String getPassword()
getPassword
in interface FBManagerMBean
public void setPassword(java.lang.String password)
setPassword
in interface FBManagerMBean
password
- Value to assign to passwordpublic void setDialect(int dialect)
dialect
- Database dialect (1 or 3)java.lang.IllegalArgumentException
- if value is not 1 or 3public int getDialect()
public boolean isCreateOnStart()
isCreateOnStart
in interface FBManagerMBean
public void setCreateOnStart(boolean createOnStart)
setCreateOnStart
in interface FBManagerMBean
createOnStart
- Value to assign to createOnStartpublic boolean isDropOnStop()
isDropOnStop
in interface FBManagerMBean
public void setDropOnStop(boolean dropOnStop)
setDropOnStop
in interface FBManagerMBean
dropOnStop
- Value to assign to dropOnStoppublic boolean isForceCreate()
isForceCreate
in interface FBManagerMBean
public void setForceCreate(boolean forceCreate)
setForceCreate
in interface FBManagerMBean
forceCreate
- The new ForceCreate value.public void createDatabase(java.lang.String fileName, java.lang.String user, java.lang.String password) throws java.lang.Exception
createDatabase
in interface FBManagerMBean
java.lang.Exception
public void dropDatabase(java.lang.String fileName, java.lang.String user, java.lang.String password) throws java.lang.Exception
dropDatabase
in interface FBManagerMBean
java.lang.Exception
public boolean isDatabaseExists(java.lang.String fileName, java.lang.String user, java.lang.String password) throws java.lang.Exception
isDatabaseExists
in interface FBManagerMBean
java.lang.Exception
Copyright © 2001-2019 Jaybird (Firebird JDBC/JCA) team. All rights reserved.