net.kano.joscar.snac
Interface VetoableSnacPacketListener


public interface VetoableSnacPacketListener

Provides an interface for processing and intercepting SNAC packets received on a SNAC processor, optionally halting further processing of any given packet.


Field Summary
static java.lang.Object CONTINUE_PROCESSING
          A value indicating that the SNAC processor should continue processing the given packet normally.
static java.lang.Object STOP_PROCESSING_ALL
          A value indicating the SNAC processor should stop all further processing of a packet immediately.
static java.lang.Object STOP_PROCESSING_LISTENERS
          A value indicating that the SNAC processor should stop passing the packet through other vetoable and non-vetoable listeners.
 
Method Summary
 java.lang.Object handlePacket(SnacPacketEvent event)
          Called when a new packet arrives on a SNAC connection.
 

Field Detail

STOP_PROCESSING_LISTENERS

public static final java.lang.Object STOP_PROCESSING_LISTENERS
A value indicating that the SNAC processor should stop passing the packet through other vetoable and non-vetoable listeners. This value indicates that further internal processing may be performed on the packet, though as of this writing no such processing is done either way. It is suggested to use this instead of STOP_PROCESSING_ALL, however, to allow for future expansion of the SNAC processing code internal to joscar.


STOP_PROCESSING_ALL

public static final java.lang.Object STOP_PROCESSING_ALL
A value indicating the SNAC processor should stop all further processing of a packet immediately. As of this writing, this is functionally equivalent to STOP_PROCESSING_LISTENERS, as no further processing is done anyway.


CONTINUE_PROCESSING

public static final java.lang.Object CONTINUE_PROCESSING
A value indicating that the SNAC processor should continue processing the given packet normally.

Method Detail

handlePacket

public java.lang.Object handlePacket(SnacPacketEvent event)
Called when a new packet arrives on a SNAC connection. See individual documentation for CONTINUE_PROCESSING, STOP_PROCESSING_LISTENERS, and STOP_PROCESSING_ALL for details on when to return which value.

Parameters:
event - an object describing the event
Returns:
one of CONTINUE_PROCESSING, STOP_PROCESSING_LISTENERS, and STOP_PROCESSING_ALL