|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsg.edu.nus.peer.event.PingListener
public class PingListener
Implement a listener when processing a PING message.
Constructor Summary | |
---|---|
PingListener()
|
Method Summary | |
---|---|
void |
actionPerformed(java.io.ObjectOutputStream oos,
Message msg)
Invoked when a networking event occurs. |
boolean |
isConsumed(Message msg)
Determine if the listener can consume the network event. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PingListener()
Method Detail |
---|
public void actionPerformed(java.io.ObjectOutputStream oos, Message msg) throws EventHandleException
ActionListener
Note: the consumed state should be reset before return a response message.
actionPerformed
in interface ActionListener
oos
- the output stream used for replying a message
to the request peer.msg
- the message to be processed
EventHandleException
public boolean isConsumed(Message msg) throws EventHandleException
ActionListener
isConsumed
in interface ActionListener
msg
- the network event
true
;
otherwise, return false
EventHandleException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |