net.kano.joscar.snac
Class SnacRequestAdapter

java.lang.Object
  extended bySnacRequestAdapter
All Implemented Interfaces:
OutgoingSnacRequestListener, SnacRequestListener, SnacResponseListener

public abstract class SnacRequestAdapter
extends java.lang.Object
implements SnacRequestListener

Provides an empty implementation of SnacRequestListener. This is convenient in that one can subclass SnacRequestAdapter to avoid having to write rather ugly empty methods to fulfill the SnacRequestListener contract, handling events you don't particularly care about.


Constructor Summary
SnacRequestAdapter()
           
 
Method Summary
 void handleResponse(SnacResponseEvent e)
          Called when a SNAC packet is received in response to a request.
 void handleSent(SnacRequestSentEvent e)
          Called when an outgoing SNAC request was sent over a SNAC connection.
 void handleTimeout(SnacRequestTimeoutEvent event)
          Called when a SNAC packet "times out" and is removed from the request list of its parent ClientSnacProcessor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnacRequestAdapter

public SnacRequestAdapter()
Method Detail

handleSent

public void handleSent(SnacRequestSentEvent e)
Description copied from interface: OutgoingSnacRequestListener
Called when an outgoing SNAC request was sent over a SNAC connection. This method will be called only once for each request this listener has been added to.

Specified by:
handleSent in interface OutgoingSnacRequestListener
Parameters:
e - an object describing the event

handleResponse

public void handleResponse(SnacResponseEvent e)
Description copied from interface: SnacResponseListener
Called when a SNAC packet is received in response to a request. This may be called multiple times, as a request can have more than one response.

Specified by:
handleResponse in interface SnacResponseListener
Parameters:
e - an object describing the event

handleTimeout

public void handleTimeout(SnacRequestTimeoutEvent event)
Description copied from interface: OutgoingSnacRequestListener
Called when a SNAC packet "times out" and is removed from the request list of its parent ClientSnacProcessor. This will be called only once for each request to which this listener has been added.

Specified by:
handleTimeout in interface OutgoingSnacRequestListener
Parameters:
event - an object describing the event