Java Code Examples for org.jivesoftware.smack.packet.IQ#Type

The following examples show how to use org.jivesoftware.smack.packet.IQ#Type . 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 vote down vote up
@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 2
Source File: IQTypeFilter.java    From AndroidPNClient with Apache License 2.0 4 votes vote down vote up
public IQTypeFilter(IQ.Type type) {
	this.type = type;
}
 
Example 3
Source File: IQTypeFilter.java    From Smack with Apache License 2.0 4 votes vote down vote up
private IQTypeFilter(IQ.Type type) {
    super(IQ.class);
    this.type = Objects.requireNonNull(type, "Type must not be null");
}
 
Example 4
Source File: XMPPConnection.java    From Smack with Apache License 2.0 2 votes vote down vote up
/**
 * 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);
 
Example 5
Source File: IQRequestHandler.java    From Smack with Apache License 2.0 votes vote down vote up
IQ.Type getType();