org.firebirdsql.management

Class FBManager

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.
Version:
1.0
Author:
David Jencks

Constructor Summary

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

Method Summary

void
createDatabase(String fileName, String user, String password)
void
dropDatabase(String fileName, String user, String password)
String
getFileName()
mbean get-set pair for field fileName Get the value of fileName
String
getName()
String
getPassword()
mbean get-set pair for field password Get the value of password
int
getPort()
String
getServer()
String
getState()
String
getType()
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(String fileName, String user, 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
setDropOnStop(boolean dropOnStop)
Set the value of dropOnStop
void
setFileName(String fileName)
Set the value of fileName
void
setForceCreate(boolean forceCreate)
Set the ForceCreate value.
void
setPassword(String password)
Set the value of password
void
setPort(int port)
void
setServer(String host)
void
setType(String type)
void
setUserName(String userName)
Set the value of userName
void
start()
void
stop()

Constructor Details

FBManager

public FBManager()

FBManager

public FBManager(String type)

FBManager

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

Method Details

createDatabase

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

dropDatabase

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

getFileName

public String getFileName()
mbean get-set pair for field fileName Get the value of fileName
Specified by:
getFileName in interface FBManagerMBean
Returns:
value of fileName

getName

public String getName()
Specified by:
getName in interface FBManagerMBean

getPassword

public String getPassword()
mbean get-set pair for field password Get the value of password
Specified by:
getPassword in interface FBManagerMBean
Returns:
value of password

getPort

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

getServer

public String getServer()
Specified by:
getServer in interface FBManagerMBean

getState

public String getState()
Specified by:
getState in interface FBManagerMBean

getType

public String getType()

getUserName

public String getUserName()
mbean get-set pair for field userName Get the value of userName
Specified by:
getUserName in interface FBManagerMBean
Returns:
value of userName

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

isDatabaseExists

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

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

isForceCreate

public boolean isForceCreate()
Get the ForceCreate value.
Specified by:
isForceCreate in interface FBManagerMBean
Returns:
the ForceCreate value.

setCreateOnStart

public void setCreateOnStart(boolean createOnStart)
Set the value of createOnStart
Specified by:
setCreateOnStart in interface FBManagerMBean
Parameters:
createOnStart - Value to assign to createOnStart

setDropOnStop

public void setDropOnStop(boolean dropOnStop)
Set the value of dropOnStop
Specified by:
setDropOnStop in interface FBManagerMBean
Parameters:
dropOnStop - Value to assign to dropOnStop

setFileName

public void setFileName(String fileName)
Set the value of fileName
Specified by:
setFileName in interface FBManagerMBean
Parameters:
fileName - Value to assign to fileName

setForceCreate

public void setForceCreate(boolean forceCreate)
Set the ForceCreate value.
Specified by:
setForceCreate in interface FBManagerMBean
Parameters:
forceCreate - The new ForceCreate value.

setPassword

public void setPassword(String password)
Set the value of password
Specified by:
setPassword in interface FBManagerMBean
Parameters:
password - Value to assign to password

setPort

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

setServer

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

setType

public void setType(String type)

setUserName

public void setUserName(String userName)
Set the value of userName
Specified by:
setUserName in interface FBManagerMBean
Parameters:
userName - Value to assign to userName

start

public void start()
            throws Exception
Specified by:
start in interface FBManagerMBean

stop

public void stop()
            throws Exception
Specified by:
stop in interface FBManagerMBean

Copyright B) 2001 David Jencks and other authors. All rights reserved.