sg.edu.nus.peer.event
Interface ActionListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
ActionAdapter, AttachListener, ForceOutListener, JoinListener, LeaveListener, LoginListener, PingListener, PongListener, RegisterListener, SPDeleteListener, SPInsertBundleListener, SPInsertListener, SPJoinAcceptListener, SPJoinForceForwardListener, SPJoinForceListener, SPJoinListener, SPJoinSplitDataListener, SPLBFindLightlyNodeListener, SPLBGetLoadInfoListener, SPLBGetLoadInfoReplyListener, SPLBGetLoadInfoResendListener, SPLBNoRotationNodeListener, SPLBRotateUpdateAdjacentListener, SPLBRotateUpdateAdjacentReplyListener, SPLBRotateUpdateChildListener, SPLBRotateUpdateChildReplyListener, SPLBRotateUpdateParentListener, SPLBRotateUpdateParentReplyListener, SPLBRotateUpdateRTListener, SPLBRotateUpdateRTReplyListener, SPLBRotationPullListener, SPLBSplitDataListener, SPLBSplitDataResendListener, SPLBStablePositionListener, SPLeaveFindReplaceListener, SPLeaveFindReplaceReplyListener, SPLeaveListener, SPLeaveNotifyListener, SPLeaveReplacementListener, SPLeaveUrgentListener, SPLIAdjacentListener, SPLIAdjacentReplyListener, SPLIAdjacentRootListener, SPLIAdjacentRootReplyListener, SPLIChildReplyListener, SPLIRoutingTableListener, SPLIRoutingTableReplyListener, SPLIUpdateParentListener, SPNotifyFailureListener, SPNotifyImbalanceListener, SPPassClientListener, SPSearchExactBundleListener, SPSearchExactListener, SPSearchExactResultListener, SPSearchPairListener, SPSearchRangeListener, SPSearchRangeResultListener, SPUpdateAdjacentLinkListener, SPUpdateMinMaxValueListener, SPUpdateRouteTableDirectlyListener, SPUpdateRouteTableIndirectlyListener, SPUpdateRouteTableListener, SPUpdateRouteTableReplyListener

public interface ActionListener
extends java.util.EventListener

The listener interface for receiving networking events. The class that is interested in processing a networking event implements this interface, and the object created with that class is registered by using the object's addActionListener method. When the networking event occurs, that object's actionPerformed method is invoked.

Version:
1.0 2006-1-24
Author:
Xu Linhao

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.
 

Method Detail

actionPerformed

void actionPerformed(java.io.ObjectOutputStream oos,
                     Message msg)
                     throws EventHandleException
Invoked when a networking event occurs.

Note: the consumed state should be reset before return a response message.

Parameters:
oos - the output stream used for replying a message to the request peer.
msg - the message to be processed
Throws:
EventHandleException

isConsumed

boolean isConsumed(Message msg)
                   throws EventHandleException
Determine if the listener can consume the network event.

Parameters:
msg - the network event
Returns:
if the listener can consume the event, return true; otherwise, return false
Throws:
EventHandleException