|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jtge.engine.net.Peer
Captures client and server common behaviours.
Constructor Summary | |
Peer(IPeerFactory factory)
Create an abstract peer. |
Method Summary | |
void |
close()
Perform a close operation. |
void |
handle(ICommand command)
Handle a command. |
protected void |
onClose()
Perform custom close. |
void |
register(IChannelObserver observer)
Register a channel observer. |
void |
register(IConsumer consumer)
Hook a consumer to receive commands sent to the peer. |
void |
register(IStatusObserver observer)
Register a status observer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Peer(IPeerFactory factory)
factory
- the peer factoryMethod Detail |
public final void register(IConsumer consumer)
consumer
- the consumerpublic final void register(IChannelObserver observer)
observer
- the observerpublic final void register(IStatusObserver observer)
observer
- the observerpublic final void close()
close
in interface IClosable
protected void onClose()
public final void handle(ICommand command)
handle
in interface IConsumer
command
- the command to handle
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |