net.kano.joscar.flap
Interface VetoableFlapPacketListener


public interface VetoableFlapPacketListener

Provides an interface for listening for -- and optionally halting further processing of -- FLAP packets received on a FlapProcessor.


Field Summary
static java.lang.Object CONTINUE_PROCESSING
          Tells the FlapProcessor to continue processing as usual; that is, this value signifies that this packet has not been vetoed.
static java.lang.Object STOP_PROCESSING_ALL
          Tells the FlapProcessor to halt all further processing of this command whatsoever.
static java.lang.Object STOP_PROCESSING_LISTENERS
          Tells the FlapProcessor to stop processing other vetoable and non-vetoable listeners, but to continue its own internal processing.
 
Method Summary
 java.lang.Object handlePacket(FlapPacketEvent event)
          Processes a single packet received by a FlapProcessor.
 

Field Detail

STOP_PROCESSING_LISTENERS

public static final java.lang.Object STOP_PROCESSING_LISTENERS
Tells the FlapProcessor to stop processing other vetoable and non-vetoable listeners, but to continue its own internal processing.

Note that as of this writing there is no internal processing; until such processing exists this value is functionally equivalent to STOP_PROCESSING_ALL. It is suggested, however, to use this value instead of STOP_PROCESSING_ALL to allow for further expansion of FlapProcessor's processing code.


CONTINUE_PROCESSING

public static final java.lang.Object CONTINUE_PROCESSING
Tells the FlapProcessor to continue processing as usual; that is, this value signifies that this packet has not been vetoed.


STOP_PROCESSING_ALL

public static final java.lang.Object STOP_PROCESSING_ALL
Tells the FlapProcessor to halt all further processing of this command whatsoever. This value may or may not be actually honored in the future: currently this value is functionally equivalent to STOP_PROCESSING_LISTENERS as no fruther processing is done on FLAP packets by the FlapProcessor.

Method Detail

handlePacket

public java.lang.Object handlePacket(FlapPacketEvent event)
Processes a single packet received by a FlapProcessor.

Parameters:
event - an object containing information on the packet's receipt
Returns:
an object representing what action should be taken by the FlapProcessor; must be one of CONTINUE_PROCESSING, STOP_PROCESSING_LISTENERS, and STOP_PROCESSING_ALL (see each's documentation for details)