org.firebirdsql.management

## Class FBManager

- java.lang.Object
- - org.firebirdsql.management.FBManager

- All Implemented Interfaces:
    FBManagerMBean

      public class FBManager
      extends java.lang.Object
      implements FBManagerMBean

  A simple jmx mbean that allows you to create and drop databases.
  Version:
    1.0
  Author:
    David Jencks, Mark Rotteveel

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FBManager()`
    `FBManager(GDSType type)`
    `FBManager(java.lang.String type)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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)`
    `java.lang.String` | `getDefaultCharacterSet()`
    `int` | `getDialect()`
    `java.lang.String` | `getFileName()` mbean get-set pair for field fileName Get the value of fileName
    `java.lang.String` | `getName()`
    `int` | `getPageSize()`
    `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` | `setDefaultCharacterSet(java.lang.String firebirdCharsetName)` Set the default database character set.
    `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` | `setPageSize(int pageSize)` Set the page size that will be used for the database.
    `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(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()

      Description copied from interface: `FBManagerMBean`
      mbean get-set pair for field fileName Get the value of fileName
      Specified by:
        `getFileName` in interface `FBManagerMBean`
      Returns:
        value of fileName

    - #### setFileName

          public void setFileName(java.lang.String fileName)

      Description copied from interface: `FBManagerMBean`
      Set the value of fileName
      Specified by:
        `setFileName` in interface `FBManagerMBean`
      Parameters:
        `fileName` - Value to assign to fileName

    - #### getType

          public java.lang.String getType()

    - #### setType

          public void setType(java.lang.String type)

    - #### getUserName

          public java.lang.String getUserName()

      Description copied from interface: `FBManagerMBean`
      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)

      Description copied from interface: `FBManagerMBean`
      Set the value of userName
      Specified by:
        `setUserName` in interface `FBManagerMBean`
      Parameters:
        `userName` - Value to assign to userName

    - #### getPassword

          public java.lang.String getPassword()

      Description copied from interface: `FBManagerMBean`
      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)

      Description copied from interface: `FBManagerMBean`
      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()

    - #### setPageSize

          public void setPageSize(int pageSize)

      Description copied from interface: `FBManagerMBean`
      Set the page size that will be used for the database. The value for `pageSize` must be one of `PageSizeConstants`. The default value depends on the Firebird version.

      Some values are not valid on all Firebird versions.

      Specified by:
        `setPageSize` in interface `FBManagerMBean`
      Parameters:
        `pageSize` - The page size to be used in the created database, see `PageSizeConstants`
      See Also:
        `PageSizeConstants`

    - #### getPageSize

          public int getPageSize()

      Specified by:
        `getPageSize` in interface `FBManagerMBean`
      Returns:
        The page size to be used when creating a database, or `-1` if the database default is used.

    - #### setDefaultCharacterSet

          public void setDefaultCharacterSet(java.lang.String firebirdCharsetName)

      Description copied from interface: `FBManagerMBean`
      Set the default database character set.
      Specified by:
        `setDefaultCharacterSet` in interface `FBManagerMBean`
      Parameters:
        `firebirdCharsetName` - Character set name, use Firebird names only; `null` will use Firebird default (`NONE`). Specifying an invalid name will result in an exception during database creation.

    - #### getDefaultCharacterSet

          public java.lang.String getDefaultCharacterSet()

      Specified by:
        `getDefaultCharacterSet` in interface `FBManagerMBean`
      Returns:
        The default character set name, `null` means not set.

    - #### isCreateOnStart

          public boolean isCreateOnStart()

      Description copied from interface: `FBManagerMBean`
      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)

      Description copied from interface: `FBManagerMBean`
      Set the value of createOnStart
      Specified by:
        `setCreateOnStart` in interface `FBManagerMBean`
      Parameters:
        `createOnStart` - Value to assign to createOnStart

    - #### isDropOnStop

          public boolean isDropOnStop()

      Description copied from interface: `FBManagerMBean`
      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)

      Description copied from interface: `FBManagerMBean`
      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-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.