|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.engine.AvailabilityChecker
public final class AvailabilityChecker
This checks depending on the run level to accept or deny messages from outside.
Field Summary | |
---|---|
private ServerScope |
glob
|
private static java.util.logging.Logger |
log
|
private java.lang.String |
ME
|
private RunlevelManager |
runlevelManager
|
private boolean |
startup
|
Constructor Summary | |
---|---|
AvailabilityChecker(ServerScope glob)
Ctor |
Method Summary | |
---|---|
XmlBlasterException |
checkException(MethodName action,
java.lang.Throwable origEx)
Checks the given exception and depending on the current run level it is converted into a communication exception (with the original embedded). |
void |
checkServerIsReady(SessionName sessionName,
AddressServer addressServer,
MsgUnit msgUnit,
MethodName action)
The extended check when the message is imported/decrypted. |
java.lang.String |
getName()
A human readable name of the listener for logging. |
java.lang.String |
getStatus(java.lang.String qos)
Returns the stringified availability status. |
void |
runlevelChange(int from,
int to,
boolean force)
Invoked on run level change, see RunlevelManager.RUNLEVEL_HALTED and RunlevelManager.RUNLEVEL_RUNNING Enforced by I_RunlevelListener |
void |
shutdown()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String ME
private final ServerScope glob
private static java.util.logging.Logger log
private RunlevelManager runlevelManager
private boolean startup
Constructor Detail |
---|
public AvailabilityChecker(ServerScope glob)
glob
- Method Detail |
---|
public void shutdown()
public java.lang.String getStatus(java.lang.String qos)
qos
- Currently ignored
org.xmlBlaster.protocol.I_XmlBlaster#ping(String)
public void checkServerIsReady(SessionName sessionName, AddressServer addressServer, MsgUnit msgUnit, MethodName action) throws XmlBlasterException
sessionName
- The client, null is OKmsgUnit
- The decrypted (readable) message received, null is OKaction
- The method name for logging, never null!
XmlBlasterException:
- If the server is not in a run level to accept messages
it throws ErrorCode.COMMUNICATION_NOCONNECTION_SERVERDENY
XmlBlasterException
public XmlBlasterException checkException(MethodName action, java.lang.Throwable origEx)
action
- The method name for loggingorigEx
- The internal cause during shutdown
public java.lang.String getName()
getName
in interface I_RunlevelListener
public void runlevelChange(int from, int to, boolean force) throws XmlBlasterException
runlevelChange
in interface I_RunlevelListener
from
- The current runlevelto
- The runlevel we want to switch toforce
- If true force the change even if messages are lost
XmlBlasterException
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |