|
jGCS Documentation | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jgcs.AbstractControlSession
public abstract class AbstractControlSession
This class defines a AbstractControlSession. It partially implements the ControlSession interface by handling the listeners. It provides methods for notification of listeners that can be used by final implementations.
Constructor Summary | |
---|---|
AbstractControlSession()
|
Method Summary | |
---|---|
protected void |
boot()
Initializes any variables needed by this session. |
protected boolean |
hasAllListeners()
Returns true if all listeners are registered. |
protected void |
notifyExceptionListeners(JGCSException exception)
Notifies the exception listener. |
protected void |
notifyFailed(java.net.SocketAddress peer)
Notifies the control listener that a member has failed. |
protected void |
notifyJoin(java.net.SocketAddress peer)
Notifies the control listener of a new member in the group. |
protected void |
notifyLeave(java.net.SocketAddress peer)
Notifies the control listener of a leaved member. |
void |
setControlListener(ControlListener listener)
Sets the control listener. |
void |
setExceptionListener(ExceptionListener listener)
Sets the exception listener. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.jgcs.ControlSession |
---|
getLocalAddress, isJoined, join, leave |
Constructor Detail |
---|
public AbstractControlSession()
Method Detail |
---|
protected void boot()
public void setControlListener(ControlListener listener)
setControlListener
in interface ControlSession
listener
- The listener to be bound to the membership service.public void setExceptionListener(ExceptionListener listener)
setExceptionListener
in interface ControlSession
listener
- the exception thrown by the implementation of the interface.protected boolean hasAllListeners()
protected void notifyExceptionListeners(JGCSException exception)
exception
- the exception to notify.protected void notifyJoin(java.net.SocketAddress peer)
peer
- the address of the new member.protected void notifyLeave(java.net.SocketAddress peer)
peer
- the address of the old member.protected void notifyFailed(java.net.SocketAddress peer)
peer
- the address of the old member.
|
jGCS Documentation | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |