tigase.jaxmpp.core.client
Class ResponseManager

java.lang.Object
  extended by tigase.jaxmpp.core.client.ResponseManager

public class ResponseManager
extends Object


Nested Class Summary
protected static class ResponseManager.Entry
           
 
Field Summary
protected static long DEFAULT_TIMEOUT
           
protected  Logger log
           
 
Constructor Summary
ResponseManager()
           
 
Method Summary
 void checkTimeouts()
           
protected  Map<String,ResponseManager.Entry> getHandlers()
           
 Runnable getResponseHandler(Element element, PacketWriter writer, SessionObject sessionObject)
          Returns handler for response of sent stanza.
 String registerResponseHandler(Element stanza, Long timeout, AsyncCallback callback)
          Register callback for response of sent stanza.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TIMEOUT

protected static final long DEFAULT_TIMEOUT
See Also:
Constant Field Values

log

protected final Logger log
Constructor Detail

ResponseManager

public ResponseManager()
Method Detail

checkTimeouts

public void checkTimeouts()
                   throws JaxmppException
Throws:
JaxmppException

getHandlers

protected Map<String,ResponseManager.Entry> getHandlers()

getResponseHandler

public Runnable getResponseHandler(Element element,
                                   PacketWriter writer,
                                   SessionObject sessionObject)
                            throws JaxmppException
Returns handler for response of sent stanza.

Parameters:
element - reponse stanza.
writer - Packet writer
Returns:
Runnable object with handler
Throws:
XMLException
JaxmppException

registerResponseHandler

public String registerResponseHandler(Element stanza,
                                      Long timeout,
                                      AsyncCallback callback)
                               throws XMLException
Register callback for response of sent stanza.

Parameters:
stanza - sent stanza.
timeout - timeout. After it method onTimeout() will be called.
callback - callback
Returns:
id of stanza
Throws:
XMLException


Copyright © 2006-2012 Tigase. All Rights Reserved.