|
Novell exteNd Messaging Platform 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sssw.jbroker.api.cluster.CustomPolicyContext
The CustomPolicyContext
class is used to carry context between
invocations of the getAddress
method of a custom policy controller
callback implementation. If the CustomPolicyController
can be
invoked from multiple threads, the context should be used if the implementation
requires to keep state to implement the custom clustering scheme.
The first time the getAddress
method is called, the context will
contain no data and no exception. The getAddress
callback method
can set arbitrary data (such as an index into the TCPAddress
list)
using the setContextData
method, which will be available upon
subsequent calls. On the second and subsequent invocations, the context's data
will be whatever the callback set on the previous invocation. The
getException
method will return the exception that was raised when
the ORB invoked the address previously returned by the getAddress
method of the custom policy controller.
CustomPolicyController
,
Serialized FormConstructor Summary | |
CustomPolicyContext()
|
Method Summary | |
Object |
getContextData()
Get the context data previously set. |
SystemException |
getException()
Get the exception raised when ORB invoked on the TCPAddress
previously returned by the CustomPolicyController 's
getAddress method |
void |
setContextData(Object data)
Set the context data for future invocations of getAddress . |
void |
setException(SystemException exception)
Set the exception raised when ORB invoked on the TCPAddress
returned by the CustomPolicyController 's getAddress
method |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CustomPolicyContext()
Method Detail |
public Object getContextData()
public void setContextData(Object data)
getAddress
.
A custom policy controller might for instance set state used in the
custom cluster algorithm such as TCP addresses that have already been
tried.
data
- the context datapublic SystemException getException()
TCPAddress
previously returned by the CustomPolicyController
's
getAddress
method
getAddress
is
invoked the first timepublic void setException(SystemException exception)
TCPAddress
returned by the CustomPolicyController
's getAddress
method
exception
- the last system exception
|
Novell exteNd Messaging Platform 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |