jet.server.api.admin
Interface ClusterAdminService


public interface ClusterAdminService

Specifies the properties used for the whole cluster (need security, active realm, JSP enabled, publish temp result to version enabled, mail configuration), and shuts down the specified sever in the cluster if stand alone 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)
          Deprecated.  
 java.lang.String addPredefinedServer(java.lang.String name, java.lang.String host, java.lang.String port, java.lang.String submitter)
          Deprecated.  
 boolean canEditPredefinedServers()
          Deprecated.  
 java.lang.String getActiveRealm()
          Gets the active realm of the server.
 int getCheckAdminCrashedInterval()
          Deprecated.  
 int getDefaultMailFormat()
          Returns the mail format.
 java.lang.String getLoadBalanceCustomClass()
          Returns the load balance custom class.
 int getLoadBalanceType()
          Returns the load balance type.
 java.lang.String getMailBox()
          Returns the mail sender's address.
 java.util.Vector getMailFormats()
          Returns all the mail formats.
 int getMailPort()
          Returns the smtp mail server's port.
 java.lang.String getMailServer()
          Returns the smtp mail server's name.
 boolean getMessageMode()
          Gets the internal message mode in JReport server.
 java.lang.String getNotifyServerDownAddress()
          Specifies the target address of the notification mail after a server in the cluster is down.
 Member[] getPredefinedServers()
          Deprecated.  
 boolean isClusterSendConcurrentReport()
          Returns whether the cluster sends concurrent reports.
 boolean isEnableCompress()
          Returns true if to compress the mail, false otherwise.
 boolean isEnableJSP()
          Returns if to use JSP.
 boolean isEnableNotifyServerDown()
          Gets whether to send notification mail after a server in the cluster is down.
 boolean isEnablePublishTempToVersion()
          Checks if to enable publishing temporary result to version.
 boolean isNeedSecurity()
          Returns if security authentication is needed.
 java.util.Properties loadClusterWeights()
          Loads cluster weights.
 java.lang.String removePredefinedServer(java.lang.String name, java.lang.String submitter)
          Deprecated.  
 long runTestReport(java.lang.String name, java.util.Properties ht)
          Returns the time (ms) for running a test report in a specified cluster member.
 void saveClusterWeights(java.util.Properties ep)
          Saves cluster weights.
 void setActiveRealm(java.lang.String realmName, java.lang.String submmiter)
          Sets the active realm used in the whole cluster.
 void setCheckAdminCrashedInterval(int interval)
          Deprecated.  
 void setClusterSendConcurrentReport(java.lang.Boolean isSendReport)
          Sets whether the cluster sends concurrent reports.
 void setDefaultMailFormat(int mailFormat, java.lang.String submitter)
          Sets the mail format.
 void setEnableCompress(boolean isEnable, java.lang.String submitter)
          Sets if to compress the mail.
 void setEnableJSP(boolean enable, java.lang.String submitter)
          Sets whether to enable using JSP in the whole cluster.
 void setEnableNotifyServerDown(boolean enable)
          Specifies whether to send notification mail after a server in the cluster is down.
 void setEnablePublishTempToVersion(boolean enable, java.lang.String submitter)
          Sets whether to enable publishing temporary result to version in the whole cluster.
 void setLoadBalanceCustomClass(java.lang.String customClass)
          Specifies the class name of user's load balancer.
 void setLoadBalanceType(int type)
          Specifies the load-balance type.
 void setMailBox(java.lang.String mailBox, java.lang.String submitter)
          Sets the mail sender's address.
 void setMailPort(int port, java.lang.String submitter)
          Sets the smtp mail server's port.
 void setMailServer(java.lang.String smtpServerName, java.lang.String submitter)
          Sets the smtp mail server's name.
 void setMessageMode(boolean mode)
          Sets the internal message mode in JReport server.
 void setNeedSecurity(boolean need, java.lang.String submitter)
          Sets whether to enable security authentication in the whole cluster.
 void setNotifyServerDownAddress(java.lang.String address)
          Specifies the target address of the notification mail after a server in the cluster is down.
 java.lang.String stopCluster(java.lang.String submitter)
          Stops all the servers in the cluster.
 java.lang.String stopServer(java.lang.String name, java.lang.String submitter)
          Stops 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
Stops a server in the cluster.

Parameters:
name - server name of the specified server.
submitter - the user who requested this action.
Returns:
error message if any error occurs but no exception is thrown, or null if successful.
Throws:
if - error occurs when trying to stop the server.
ClusterException
See Also:
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

Stops a server in the cluster

Parameters:
host - host name of the specified server.
port - rmi port which the specified server uses.
submitter - the user who requested this action.
Returns:
error message if any error occurs but no exception is thrown, or null if successful.
Throws:
if - error occurs when trying to stop the server.
ClusterException

stopCluster

java.lang.String stopCluster(java.lang.String submitter)
                             throws ClusterException
Stops all the servers in the cluster.

Parameters:
submitter - the user who requested this action.
Returns:
error message if any error occurs but no exception is thrown, or null if successful.
Throws:
if - error occurs when trying to stop the whole cluster.
ClusterException

canEditPredefinedServers

boolean canEditPredefinedServers()
Deprecated. 

Checks If able to edit predefined server list of the cluster. Only the original admin server of the cluster can edit the predefined server list, that is, if admin server is promoted from a backup server, edition is disabled.

Returns:
true if able to edit, otherwise false.

getCheckAdminCrashedInterval

int getCheckAdminCrashedInterval()
Deprecated. 

Gets the interval time value (minutes) for when backup server auto checks if admin server crashed.

Returns:
interval time (minutes).

setCheckAdminCrashedInterval

void setCheckAdminCrashedInterval(int interval)
Deprecated. 

Sets the interval time value (minutes) for when 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
Deprecated. 

Adds a clustered server into the predefined server list of the cluster.

Parameters:
name - clustered server's name.
host - clustered server's host.
port - clustered server's rmi port.
submitter - the user who requested this action.
Returns:
error message if any error occurs but no exception is thrown, or null if successful.
Throws:
if - any error occurs when trying to add the clustered server into the 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
Deprecated. 

Adds a clustered server into the predefined server list of the cluster.

Parameters:
name - clustered server's name.
host - clustered server's host.
port - clustered server's rmi port.
backupPriority - specifies backup server's priority when admin server is crashed. That is, if admin server is crashed, the server that has highest priority among active backup servers will promote itself to admin server. The priority value is a non-negative integer, "0" represents the highest priority, value "0" is reserved for admin server (if admin server is crashed, and before it restarts, a backup server will be promoted to be admin server, and the original admin server has to start as a backup server and need a backup priority).
submitter - the user who requested this action.
Returns:
error message if any error occurs but no exception is thrown, or null if successul.
Throws:
if - any error occurs when trying to add the clustered server into the predefined server list.
ClusterException

removePredefinedServer

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

Removes a clustered server from the predefined server list of the cluster.

Parameters:
name - the name of the clustered server which is requested to remove.
submitter - the user who requested this action.
Returns:
error message if any error occurs but no exception is thrown, or null if successful.
Throws:
if - any error occurs when trying to remove the clustered server from the predefined server list.
ClusterException

getPredefinedServers

Member[] getPredefinedServers()
Deprecated. 

Gets all server list that is predefined.

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

setEnableNotifyServerDown

void setEnableNotifyServerDown(boolean enable)
Specifies whether to send notification mail after a server in the cluster is down.

Parameters:
enable - true if enabled to send notification mail.

isEnableNotifyServerDown

boolean isEnableNotifyServerDown()
Gets whether to send notification mail after a server in the cluster is down.

Returns:
true if enabled to send notification mail.

setNotifyServerDownAddress

void setNotifyServerDownAddress(java.lang.String address)
Specifies the target address of the notification mail after a server in the cluster is down.

Parameters:
address - target address of the mail

getNotifyServerDownAddress

java.lang.String getNotifyServerDownAddress()
Specifies the target address of the notification mail after a server in the cluster is down.

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

getActiveRealm

java.lang.String getActiveRealm()
Gets the active realm of the server.

Returns:
active realm

setActiveRealm

void setActiveRealm(java.lang.String realmName,
                    java.lang.String submmiter)
Sets the active realm used in the whole cluster.

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

isNeedSecurity

boolean isNeedSecurity()
Returns if security authentication is needed.

Returns:
true if security authentication is needed, otherwise false.

setNeedSecurity

void setNeedSecurity(boolean need,
                     java.lang.String submitter)
Sets whether to enable security authentication in the whole cluster.

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

isEnableJSP

boolean isEnableJSP()
Returns if to use JSP.

Returns:
true if to use JSP, otherwise false.

setEnableJSP

void setEnableJSP(boolean enable,
                  java.lang.String submitter)
Sets whether to enable using JSP in the whole cluster.

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

isEnablePublishTempToVersion

boolean isEnablePublishTempToVersion()
Checks if to enable publishing temporary result to version.

Returns:
true if to enable, otherwise false.

setEnablePublishTempToVersion

void setEnablePublishTempToVersion(boolean enable,
                                   java.lang.String submitter)
Sets whether to enable publishing temporary result to version in the whole cluster.

Parameters:
enable - true if to enable publishing temporary result to version, false to disable.
submitter - the user who requested this action.

setMailServer

void setMailServer(java.lang.String smtpServerName,
                   java.lang.String submitter)
Sets the smtp mail server's name.

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

getMailServer

java.lang.String getMailServer()
Returns the smtp mail server's name.

Returns:
the smtp mail server's name.

setMailPort

void setMailPort(int port,
                 java.lang.String submitter)
Sets the smtp mail server's port.

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

getMailPort

int getMailPort()
Returns the smtp mail server's port.

Returns:
the smtp mail server's port.

setMailBox

void setMailBox(java.lang.String mailBox,
                java.lang.String submitter)
Sets the mail sender's address.

Parameters:
mailBox - the mail sender's address.
submitter - the user who requested this action.

getMailBox

java.lang.String getMailBox()
Returns the mail sender's address.

Returns:
the mail sender's address.

setDefaultMailFormat

void setDefaultMailFormat(int mailFormat,
                          java.lang.String submitter)
Sets the mail format.

Parameters:
mailFormat - the mail format.
submitter - the user who requested this action.

getDefaultMailFormat

int getDefaultMailFormat()
Returns the mail format.

Returns:
the mail format.

getMessageMode

boolean getMessageMode()
Gets the internal message mode in JReport server. true - return message string. false - return message key.

Returns:
the internal message mode in JReport server.

setMessageMode

void setMessageMode(boolean mode)
Sets the internal message mode in JReport server.

Parameters:
mode,the - internal message mode in JReport server. true - return message string. false - return message key.

getMailFormats

java.util.Vector getMailFormats()
Returns all the mail formats.

Returns:
vector which represents all the mail formats.

setEnableCompress

void setEnableCompress(boolean isEnable,
                       java.lang.String submitter)
Sets if to compress the mail.

Parameters:
isEnable - if to compress the mail.
submitter - the user who requested this action.

isEnableCompress

boolean isEnableCompress()
Returns true if to compress the mail, false otherwise.

Returns:
if to compress the mail.

runTestReport

long runTestReport(java.lang.String name,
                   java.util.Properties ht)
                   throws ClusterException
Returns the time (ms) for running a test report in a specified cluster member.

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

saveClusterWeights

void saveClusterWeights(java.util.Properties ep)
Saves cluster weights.

Parameters:
ep - the properties of cluster weights

loadClusterWeights

java.util.Properties loadClusterWeights()
                                        throws java.io.IOException
Loads cluster weights.

Returns:
the properties of cluster weights
Throws:
java.io.IOException

getLoadBalanceType

int getLoadBalanceType()
Returns the load balance type.

Returns:
load balance type 0 - Uses Least Current Reports Algorithm to allocate tasks. 1 - Uses Round Robin Algorithm to allocate tasks. 2 - Uses Least Weighted Current Reports Algorithm to allocate tasks. 3 - Randomly allocates tasks.

getLoadBalanceCustomClass

java.lang.String getLoadBalanceCustomClass()
Returns the load balance custom class.

Returns:
load balance custom class

setLoadBalanceType

void setLoadBalanceType(int type)
Specifies the load-balance type.

Parameters:
type - load balance type 0 - Uses Least Current Reports Algorithm to allocate tasks. 1 - Uses Round Robin Algorithm to allocate tasks. 2 - Uses Least Weighted Current Reports Algorithm to allocate tasks. 3 - Randomly allocates tasks.

setLoadBalanceCustomClass

void setLoadBalanceCustomClass(java.lang.String customClass)
Specifies the class name of user's load balancer.

Parameters:
customClass - load balance custom class

setClusterSendConcurrentReport

void setClusterSendConcurrentReport(java.lang.Boolean isSendReport)
Sets whether the cluster sends concurrent reports.

Parameters:
isSendReport - true if the cluster sends concurrent reports

isClusterSendConcurrentReport

boolean isClusterSendConcurrentReport()
Returns whether the cluster sends concurrent reports.

Returns:
return true if the cluster sends concurrent reports