net.sf.xbus.admin
Class Administrator

java.lang.Object
  extended by net.sf.xbus.admin.Administrator

public class Administrator
extends java.lang.Object

Provides several services to administrate the xBus.


Constructor Summary
Administrator()
           
 
Method Summary
 java.lang.String demandStopBackgroundReceiver(java.lang.String system)
          Demands the stop of a background receiver.
 java.lang.String explainErrorcode(java.lang.String key)
          Explains an errorcode.
 java.lang.String getDeletedMessageFilenames()
          Reads the filenames that are currently in the Deleted Message Store.
 java.lang.String getJVMStatus()
          Returns some information about the state of the Java Virtual Machine, containing memory consumption and information about the environment.
 java.lang.String getReceiverServiceStatus()
          Returns lists of running, stopped and killed ReceiverThreads.
 java.lang.String readEtc(java.lang.String filename)
          Reads a file from XBUS_HOME/etc.
 java.lang.String readLog(java.lang.String filename, int maxLength)
          Reads a file from XBUS_HOME/log.
 java.lang.String resendDeletedMessage(java.lang.String filename)
          Resends a message from the Deleted Message Store
 java.lang.String restartReceiverService()
          Stopping all background services, refreshes the configuration and starts the background services again.
 java.lang.String startBackgroundReceiver(java.lang.String system)
          Starts a background receiver.
 java.lang.String stopReceiverService()
          Stops the ReceiverService completely, including the JMX server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Administrator

public Administrator()
Method Detail

readEtc

public java.lang.String readEtc(java.lang.String filename)
Reads a file from XBUS_HOME/etc.

Parameters:
filename - the name of the file to read
Returns:
the content of the file or an error message

readLog

public java.lang.String readLog(java.lang.String filename,
                                int maxLength)
Reads a file from XBUS_HOME/log.

Parameters:
filename - the name of the file
maxLength - maximum length to read in kbyte.
Returns:
the content of the file or an error message

explainErrorcode

public java.lang.String explainErrorcode(java.lang.String key)
Explains an errorcode.

Parameters:
key - the errorcode to explain
Returns:
the message of the errorcode

restartReceiverService

public java.lang.String restartReceiverService()
Stopping all background services, refreshes the configuration and starts the background services again.

Returns:
the confirmation or an error message

stopReceiverService

public java.lang.String stopReceiverService()
Stops the ReceiverService completely, including the JMX server.

Returns:
the confirmation or an error message

getReceiverServiceStatus

public java.lang.String getReceiverServiceStatus()
Returns lists of running, stopped and killed ReceiverThreads.

Returns:
lists of running, stopped and killed ReceiverThreads

getJVMStatus

public java.lang.String getJVMStatus()
Returns some information about the state of the Java Virtual Machine, containing memory consumption and information about the environment.

Returns:
some information about the state of the Java Virtual Machine

demandStopBackgroundReceiver

public java.lang.String demandStopBackgroundReceiver(java.lang.String system)
Demands the stop of a background receiver.

Parameters:
system - the name of the system
Returns:
a confirmation or an error message

startBackgroundReceiver

public java.lang.String startBackgroundReceiver(java.lang.String system)
Starts a background receiver.

Parameters:
system - the name of the system
Returns:
a confirmation or an error message

getDeletedMessageFilenames

public java.lang.String getDeletedMessageFilenames()
Reads the filenames that are currently in the Deleted Message Store.

Returns:
the filenames that are currently in the Deleted Message Store

resendDeletedMessage

public java.lang.String resendDeletedMessage(java.lang.String filename)
Resends a message from the Deleted Message Store

Parameters:
filename - the filename of the deleted message
Returns:
a message of success or failure