org.jivesoftware.smack.iqrequest.IQRequestHandler Java Examples
The following examples show how to use
org.jivesoftware.smack.iqrequest.IQRequestHandler.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractXMPPConnection.java From Smack with Apache License 2.0 | 6 votes |
@Override public IQRequestHandler registerIQRequestHandler(final IQRequestHandler iqRequestHandler) { final QName key = iqRequestHandler.getQName(); switch (iqRequestHandler.getType()) { case set: synchronized (setIqRequestHandler) { return setIqRequestHandler.put(key, iqRequestHandler); } case get: synchronized (getIqRequestHandler) { return getIqRequestHandler.put(key, iqRequestHandler); } default: throw new IllegalArgumentException("Only IQ type of 'get' and 'set' allowed"); } }
Example #2
Source File: AbstractXMPPConnection.java From Smack with Apache License 2.0 | 6 votes |
@Override public IQRequestHandler unregisterIQRequestHandler(String element, String namespace, IQ.Type type) { final QName key = new QName(namespace, element); switch (type) { case set: synchronized (setIqRequestHandler) { return setIqRequestHandler.remove(key); } case get: synchronized (getIqRequestHandler) { return getIqRequestHandler.remove(key); } default: throw new IllegalArgumentException("Only IQ type of 'get' and 'set' allowed"); } }
Example #3
Source File: AbstractXMPPConnection.java From Smack with Apache License 2.0 | 4 votes |
@Override public final IQRequestHandler unregisterIQRequestHandler(IQRequestHandler iqRequestHandler) { return unregisterIQRequestHandler(iqRequestHandler.getElement(), iqRequestHandler.getNamespace(), iqRequestHandler.getType()); }
Example #4
Source File: XMPPConnection.java From Smack with Apache License 2.0 | 2 votes |
/** * Register an IQ request handler with this connection. * <p> * IQ request handler process incoming IQ requests, i.e. incoming IQ stanzas of type 'get' or 'set', and return a result. * </p> * @param iqRequestHandler the IQ request handler to register. * @return the previously registered IQ request handler or null. */ IQRequestHandler registerIQRequestHandler(IQRequestHandler iqRequestHandler);
Example #5
Source File: XMPPConnection.java From Smack with Apache License 2.0 | 2 votes |
/** * Convenience method for {@link #unregisterIQRequestHandler(String, String, org.jivesoftware.smack.packet.IQ.Type)}. * * @param iqRequestHandler TODO javadoc me please * @return the previously registered IQ request handler or null. */ IQRequestHandler unregisterIQRequestHandler(IQRequestHandler iqRequestHandler);
Example #6
Source File: XMPPConnection.java From Smack with Apache License 2.0 | 2 votes |
/** * Unregister an IQ request handler with this connection. * * @param element the IQ element the IQ request handler is responsible for. * @param namespace the IQ namespace the IQ request handler is responsible for. * @param type the IQ type the IQ request handler is responsible for. * @return the previously registered IQ request handler or null. */ IQRequestHandler unregisterIQRequestHandler(String element, String namespace, IQ.Type type);