Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.server.api.admin
Interface ClusterAdminService

    public interface ClusterAdminService

Config the properties that used for whole cluster(need security, active realm, JSP enabled, publisht temp result to version enabled, mail config), and shutdown specified sever in cluster if standalone server is used.

Method Summary
`java.lang.String` | `addPredefinedServer(java.lang.String name, java.lang.String host, java.lang.String port, int backupPriority, java.lang.String submitter)` Add a clustered server into predefined server list of cluster.
`java.lang.String` | `addPredefinedServer(java.lang.String name, java.lang.String host, java.lang.String port, java.lang.String submitter)` Add a clustered server into predefined server list of cluster.
`boolean` | `canEditPredefinedServers()` If can edit predefined server list of cluster.
`java.lang.String` | `getActiveRealm()` Get the active realm of server.
`int` | `getCheckAdminCrashedInterval()` Deprecated. since JREntServer version 5.1
`int` | `getDefaultMailFormat()` Return the mail format send out.
`java.lang.String` | `getMailBox()` Return the mail form address.
`java.util.Vector` | `getMailFormats()` Return the all mail formats .
`int` | `getMailPort()` Return the smtp mail server 's port.
`java.lang.String` | `getMailServer()` Return the smtp mail server 's name.
`java.lang.String` | `getNotifyServerDownAddress()` Set the target address of mail for notification mail after a server in cluster down.
`Member[]` | `getPredefinedServers()` Get all server list that predefined.
`boolean` | `isEnableCompress()` Return true if compress mail, otherwise return false.
`boolean` | `isEnableJSP()` Return if use JSP.
`boolean` | `isEnableNotifyServerDown()` Get setting that whether send notification mail after a server in cluster down.
`boolean` | `isEnablePublishTempToVersion()` Check if enable publish temp result to version.
`boolean` | `isNeedSecurity()` Return if need security authentication
`java.util.Properties` | `loadClusterWeights()`
`java.lang.String` | `removePredefinedServer(java.lang.String name, java.lang.String submitter)` Remove a clustered server from predefined server list of cluster.
`long` | `runTestReport(java.lang.String name, java.util.Properties ht)` Return the time of running test report for in a indicated cluster member
`void` | `saveClusterWeights(java.util.Properties ep)`
`void` | `setActiveRealm(java.lang.String realmName, java.lang.String submmiter)` Set the active realm used in whole cluster.
`void` | `setCheckAdminCrashedInterval(int interval)` Deprecated. since JREntServer version 5.1
`void` | `setDefaultMailFormat(int mailFormat, java.lang.String submitter)` Set the mail format send out.
`void` | `setEnableCompress(boolean isEnable, java.lang.String submitter)` Set if compress mail.
`void` | `setEnableJSP(boolean enable, java.lang.String submitter)` Set whether enable using JSP in whole cluster.
`void` | `setEnableNotifyServerDown(boolean enable)` Set option that specify whether send notification mail after a server in cluster down.
`void` | `setEnablePublishTempToVersion(boolean enable, java.lang.String submitter)` Set whether enable publish temp result to version in whole cluster.
`void` | `setMailBox(java.lang.String mailBox, java.lang.String submitter)` set the mail form address.
`void` | `setMailPort(int port, java.lang.String submitter)` set the smtp mail server 's port.
`void` | `setMailServer(java.lang.String smtpServerName, java.lang.String submitter)` set the smtp mail server 's name .
`void` | `setNeedSecurity(boolean need, java.lang.String submitter)` Set whether enable security authentication in whole cluster.
`void` | `setNotifyServerDownAddress(java.lang.String address)` Set the target address of mail for notification mail after a server in cluster down.
`java.lang.String` | `stopCluster(java.lang.String submitter)` Stop all servers in the cluste.
`java.lang.String` | `stopServer(java.lang.String name, java.lang.String submitter)` Stop a server in the cluster
`java.lang.String` | `stopServer(java.lang.String host, java.lang.String port, java.lang.String submitter)` Deprecated. since JREntServer version 5.1

Method Detail

### stopServer

    java.lang.String stopServer(java.lang.String name,
                                java.lang.String submitter)
                                throws ClusterException

  Stop a server in the cluster

  Parameters:
    `name` - server name of the specifed server.
    `submitter` - the user who requst this action.
  Returns:
    error message if any error occurs but does not throw exception, or null if success.
  Throws:
    `if` - error occurs when try to stop server.
    `ClusterException`

### stopServer

    java.lang.String stopServer(java.lang.String host,
                                java.lang.String port,
                                java.lang.String submitter)
                                throws ClusterException

  Deprecated. since JREntServer version 5.1

  Stop a server in the cluster

  Parameters:
    `host` - host name of the specifed server.
    `port` - rmi port which the specified server used.
    `submitter` - the user who requst this action.
  Returns:
    error message if any error occurs but does not throw exception, or null if success.
  Throws:
    `if` - error occurs when try to stop server.
    `ClusterException`

### stopCluster

    java.lang.String stopCluster(java.lang.String submitter)
                                 throws ClusterException

  Stop all servers in the cluste.

  Returns:
    error message if any error occurs but does not throw exception, or null if success.
  Throws:
    `if` - error occurs when try to stop whole cluster.
    `ClusterException`

### canEditPredefinedServers

    boolean canEditPredefinedServers()

  If can edit predefined server list of cluster. Only original admin serever of cluster can edit predefined server list, that is, if admin server is promoted from a backup server, edit is disable.

  Returns:
    true if can edit, otherwise false.

### getCheckAdminCrashedInterval

    int getCheckAdminCrashedInterval()

  Deprecated. since JREntServer version 5.1

  Get the interval time value(minutes) that backup server auto check if admin server crashed.

  Returns:
    interval time(minutes).

### setCheckAdminCrashedInterval

    void setCheckAdminCrashedInterval(int interval)

  Deprecated. since JREntServer version 5.1

  Set the interval time value(minutes) that backup server auto check if admin server crashed.

  Parameters:
    `interval` - time(minutes).

### addPredefinedServer

    java.lang.String addPredefinedServer(java.lang.String name,
                                         java.lang.String host,
                                         java.lang.String port,
                                         java.lang.String submitter)
                                         throws ClusterException

  Add a clustered server into predefined server list of cluster.

  Parameters:
    `name` - clustered server's name.
    `host` - clustered server's host.
    `port` - clustered server's rmi port.
    `submitter` - the user who requst this action.
  Returns:
    error message if any error occurs but does not throw exception, or null if success.
  Throws:
    `if` - any error occurs when try to add clustered server into predefined server list.
    `ClusterException`

### addPredefinedServer

    java.lang.String addPredefinedServer(java.lang.String name,
                                         java.lang.String host,
                                         java.lang.String port,
                                         int backupPriority,
                                         java.lang.String submitter)
                                         throws ClusterException

  Add a clustered server into predefined server list of cluster.

  Parameters:
    `name` - clustered server's name.
    `host` - clustered server's host.
    `port` - clustered server's rmi port.
    `backupPriority` - specify backup server's priority when admin server was crashed. That is, if admin server was crashed, server that has highest priority in active backup servers will promote itself to admin server, priority value is a non-negative integer, "0" represent the highest priority, value "0" is reserved for admin server(if admin server was crashed, and before it restart, a backup server has promoted to admin server, original admin server has to start as backup server, it need a backup priority).
    `submitter` - the user who requst this action.
  Returns:
    error message if any error occurs but does not throw exception, or null if success.
  Throws:
    `if` - any error occurs when try to add clustered server into predefined server list.
    `ClusterException`

### removePredefinedServer

    java.lang.String removePredefinedServer(java.lang.String name,
                                            java.lang.String submitter)
                                            throws ClusterException

  Remove a clustered server from predefined server list of cluster.

  Parameters:
    `name` - name of clustered server which want to remove.
    `submitter` - the user who requst this action.
  Returns:
    error message if any error occurs but does not throw exception, or null if success.
  Throws:
    `if` - any error occurs when try to remove clustered server from predefined server list.
    `ClusterException`

### getPredefinedServers

    Member[] getPredefinedServers()

  Get all server list that predefined.

  Returns:
    a member array that represent all servers in predefined server list.

### setEnableNotifyServerDown

    void setEnableNotifyServerDown(boolean enable)

  Set option that specify whether send notification mail after a server in cluster down.

  Parameters:
    `enable` - true if enable send notification mail.
    `submitter` - the user who requst this action.

### isEnableNotifyServerDown

    boolean isEnableNotifyServerDown()

  Get setting that whether send notification mail after a server in cluster down.

  Returns:
    ture if enable send notification mail.

### setNotifyServerDownAddress

    void setNotifyServerDownAddress(java.lang.String address)

  Set the target address of mail for notification mail after a server in cluster down.

  Parameters:
    `address` - target address of mail
    `submitter` - the user who requst this action.

### getNotifyServerDownAddress

    java.lang.String getNotifyServerDownAddress()

  Set the target address of mail for notification mail after a server in cluster down.

  Returns:
    target address of mail, or "" if it is not set.

### getActiveRealm

    java.lang.String getActiveRealm()

  Get the active realm of server.

  Returns:
    active realm

### setActiveRealm

    void setActiveRealm(java.lang.String realmName,
                        java.lang.String submmiter)

  Set the active realm used in whole cluster.

  Parameters:
    `realmName` - the realm name.
    `submitter` - the user who requst this action.

### isNeedSecurity

    boolean isNeedSecurity()

  Return if need security authentication

  Returns:
    true if need security authentication, otherwise false.

### setNeedSecurity

    void setNeedSecurity(boolean need,
                         java.lang.String submitter)

  Set whether enable security authentication in whole cluster.

  Parameters:
    `need` - true if enable security authentication, false disable.
    `submitter` - the user who requst this action.

### isEnableJSP

    boolean isEnableJSP()

  Return if use JSP.

  Returns:
    true if use JSP, otherwise false.

### setEnableJSP

    void setEnableJSP(boolean enable,
                      java.lang.String submitter)

  Set whether enable using JSP in whole cluster.

  Parameters:
    `need` - true if enable using JSP, false disable.
    `submitter` - the user who requst this action.

### isEnablePublishTempToVersion

    boolean isEnablePublishTempToVersion()

  Check if enable publish temp result to version.

  Returns:
    true if enable, otherwise false.

### setEnablePublishTempToVersion

    void setEnablePublishTempToVersion(boolean enable,
                                       java.lang.String submitter)

  Set whether enable publish temp result to version in whole cluster.

  Parameters:
    `enable` - true if enable publish temp result to version, false disable.
    `submitter` - the user who requst this action.

### setMailServer

    void setMailServer(java.lang.String smtpServerName,
                       java.lang.String submitter)

  set the smtp mail server 's name .

  Parameters:
    `smtpServerName` - the smtp mail server 's name.
    `submitter` - the user who requst this action.

### getMailServer

    java.lang.String getMailServer()

  Return the smtp mail server 's name.

  Returns:
    the smtp mail server 's name.

### setMailPort

    void setMailPort(int port,
                     java.lang.String submitter)

  set the smtp mail server 's port.

  Parameters:
    `port` - the smtp mail server 's port.
    `submitter` - the user who requst this action.

### getMailPort

    int getMailPort()

  Return the smtp mail server 's port.

  Returns:
    the smtp mail server 's port.

### setMailBox

    void setMailBox(java.lang.String mailBox,
                    java.lang.String submitter)

  set the mail form address.

  Parameters:
    `mailBox` - the mail form address.
    `submitter` - the user who requst this action.

### getMailBox

    java.lang.String getMailBox()

  Return the mail form address.

  Returns:
    the mail form address.

### setDefaultMailFormat

    void setDefaultMailFormat(int mailFormat,
                              java.lang.String submitter)

  Set the mail format send out.

  Parameters:
    `mailFormat` - the mail format send out.
    `submitter` - the user who requst this action.

### getDefaultMailFormat

    int getDefaultMailFormat()

  Return the mail format send out.

  Returns:
    the mail format send out.

### getMailFormats

    java.util.Vector getMailFormats()

  Return the all mail formats .

  Returns:
    vector which all the mail format .

### setEnableCompress

    void setEnableCompress(boolean isEnable,
                           java.lang.String submitter)

  Set if compress mail.

  Parameters:
    `isEnable` - if compress mail.
    `submitter` - the user who requst this action.

### isEnableCompress

    boolean isEnableCompress()

  Return true if compress mail, otherwise return false.

  Returns:
    if compress mail.

### runTestReport

    long runTestReport(java.lang.String name,
                       java.util.Properties ht)
                       throws ClusterException

  Return the time of running test report for in a indicated cluster member

  Parameters:
    `ht` - the properties of the test report
    `name` - the name of the test cluster member
  Returns:
    the time of running
  Throws:
    `ClusterException`

### saveClusterWeights

    void saveClusterWeights(java.util.Properties ep)

### loadClusterWeights

    java.util.Properties loadClusterWeights()
                                            throws java.io.IOException

  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD