net.kano.joscar.snac
Class SnacPacketEvent

java.lang.Object
  extended byFlapPacketEvent
      extended bySnacPacketEvent
Direct Known Subclasses:
RecvRvEvent, RvSnacResponseEvent, SnacResponseEvent

public class SnacPacketEvent
extends FlapPacketEvent

An event fired when a SNAC packet is received on a SNAC processor.


Constructor Summary
protected SnacPacketEvent(FlapPacketEvent other, AbstractSnacProcessor snacProcessor, SnacPacket snacPacket, SnacCommand snacCommand)
          Creates a new SnacPacketEvent with the given properties.
protected SnacPacketEvent(SnacPacketEvent other)
          Creates a SnacPacketEvent that is a duplicate of the given object.
 
Method Summary
 SnacCommand getSnacCommand()
          Returns a SnacCommand generated from the SNAC packet that was received.
 SnacPacket getSnacPacket()
          Returns the SNAC packet that was received.
 AbstractSnacProcessor getSnacProcessor()
          Returns the SNAC processor on which a packet was received.
 
Methods inherited from class FlapPacketEvent
getFlapCommand, getFlapPacket, getFlapProcessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnacPacketEvent

protected SnacPacketEvent(SnacPacketEvent other)
Creates a SnacPacketEvent that is a duplicate of the given object.

Parameters:
other - the object to copy

SnacPacketEvent

protected SnacPacketEvent(FlapPacketEvent other,
                          AbstractSnacProcessor snacProcessor,
                          SnacPacket snacPacket,
                          SnacCommand snacCommand)
Creates a new SnacPacketEvent with the given properties.

Parameters:
other - a FlapPacketEvent to copy
snacProcessor - the SNAC processor on which the packet was received
snacPacket - the SNAC packet that was received
snacCommand - the SNAC command that was received, or null if no SNAC command object is associated with this event
Method Detail

getSnacProcessor

public final AbstractSnacProcessor getSnacProcessor()
Returns the SNAC processor on which a packet was received.

Returns:
the associated SNAC connection

getSnacPacket

public final SnacPacket getSnacPacket()
Returns the SNAC packet that was received.

Returns:
the SNAC packet that was received

getSnacCommand

public final SnacCommand getSnacCommand()
Returns a SnacCommand generated from the SNAC packet that was received.

Returns:
the SNAC command that was received