public class ResponseManager extends Object
type='get'
stanzas.Modifier and Type | Class and Description |
---|---|
protected static class |
ResponseManager.Entry |
Modifier and Type | Field and Description |
---|---|
protected static long |
DEFAULT_TIMEOUT |
protected Logger |
log |
static String |
RESPONSE_MANAGER_KEY |
Constructor and Description |
---|
ResponseManager() |
Modifier and Type | Method and Description |
---|---|
void |
checkTimeouts()
Checks if any requested IQ stanza waits for answer longer than declared
timeout.
|
protected Map<String,ResponseManager.Entry> |
getHandlers() |
static Runnable |
getResponseHandler(Context context,
Element element) |
Runnable |
getResponseHandler(Element element,
Context context)
Returns handler for response of sent
stanza. |
static ResponseManager |
getResponseManager(SessionObject sessionObject) |
String |
registerResponseHandler(Element stanza,
Long timeout,
AsyncCallback callback)
Register callback for response of sent
stanza. |
static String |
registerResponseHandler(SessionObject sessionObject,
Element stanza,
Long timeout,
AsyncCallback callback) |
static void |
setResponseManager(SessionObject sessionObject,
ResponseManager responseManager) |
public static final String RESPONSE_MANAGER_KEY
protected static final long DEFAULT_TIMEOUT
protected final Logger log
public static Runnable getResponseHandler(Context context, Element element) throws JaxmppException
JaxmppException
public static final ResponseManager getResponseManager(SessionObject sessionObject)
public static String registerResponseHandler(SessionObject sessionObject, Element stanza, Long timeout, AsyncCallback callback) throws XMLException
XMLException
public static final void setResponseManager(SessionObject sessionObject, ResponseManager responseManager)
public void checkTimeouts() throws JaxmppException
JaxmppException
protected Map<String,ResponseManager.Entry> getHandlers()
public Runnable getResponseHandler(Element element, Context context) throws JaxmppException
stanza.element
- reponse
stanza.XMLException
JaxmppException
public String registerResponseHandler(Element stanza, Long timeout, AsyncCallback callback) throws XMLException
stanza.stanza
- sent
stanza.timeout
- timeout. After it method onTimeout() will be called.callback
- callbackXMLException
Copyright © 2006–2023 Tigase. All rights reserved.