Java 类org.jivesoftware.smack.iqrequest.IQRequestHandler 实例源码

项目:Smack    文件:AbstractXMPPConnection.java   
@Override
public IQRequestHandler registerIQRequestHandler(final IQRequestHandler iqRequestHandler) {
    final String key = XmppStringUtils.generateKey(iqRequestHandler.getElement(), iqRequestHandler.getNamespace());
    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");
    }
}
项目:Smack    文件:AbstractXMPPConnection.java   
@Override
public IQRequestHandler unregisterIQRequestHandler(String element, String namespace, IQ.Type type) {
    final String key = XmppStringUtils.generateKey(element, namespace);
    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");
    }
}
项目:Smack    文件:AbstractXMPPConnection.java   
@Override
public final IQRequestHandler unregisterIQRequestHandler(IQRequestHandler iqRequestHandler) {
    return unregisterIQRequestHandler(iqRequestHandler.getElement(), iqRequestHandler.getNamespace(),
                    iqRequestHandler.getType());
}
项目:openyu-commons    文件:XmppFactoryImpl.java   
public Set<IQRequestHandler> getSetIqRequestHandler() {
    return setIqRequestHandler;
}
项目:openyu-commons    文件:XmppFactoryImpl.java   
public void setSetIqRequestHandler(Set<IQRequestHandler> setIqRequestHandler) {
    this.setIqRequestHandler = setIqRequestHandler;
}
项目:openyu-commons    文件:XmppFactoryImpl.java   
public Set<IQRequestHandler> getGetIqRequestHandler() {
    return getIqRequestHandler;
}
项目:openyu-commons    文件:XmppFactoryImpl.java   
public void setGetIqRequestHandler(Set<IQRequestHandler> getIqRequestHandler) {
    this.getIqRequestHandler = getIqRequestHandler;
}
项目:openyu-commons    文件:PoolableXmppConnection.java   
public IQRequestHandler registerIQRequestHandler(IQRequestHandler iqRequestHandler) {
    return delegate.registerIQRequestHandler(iqRequestHandler);
}
项目:openyu-commons    文件:PoolableXmppConnection.java   
public IQRequestHandler unregisterIQRequestHandler(IQRequestHandler iqRequestHandler) {
    return delegate.unregisterIQRequestHandler(iqRequestHandler);
}
项目:openyu-commons    文件:PoolableXmppConnection.java   
public IQRequestHandler unregisterIQRequestHandler(String arg0, String arg1, Type arg2) {
    return delegate.unregisterIQRequestHandler(arg0, arg1, arg2);
}
项目:openyu-commons    文件:XmppConnectionFactoryImpl.java   
public Set<IQRequestHandler> getSetIqRequestHandler() {
    return setIqRequestHandler;
}
项目:openyu-commons    文件:XmppConnectionFactoryImpl.java   
public void setSetIqRequestHandler(Set<IQRequestHandler> setIqRequestHandler) {
    this.setIqRequestHandler = setIqRequestHandler;
}
项目:openyu-commons    文件:XmppConnectionFactoryImpl.java   
public Set<IQRequestHandler> getGetIqRequestHandler() {
    return getIqRequestHandler;
}
项目:openyu-commons    文件:XmppConnectionFactoryImpl.java   
public void setGetIqRequestHandler(Set<IQRequestHandler> getIqRequestHandler) {
    this.getIqRequestHandler = getIqRequestHandler;
}
项目:Smack    文件:XMPPConnection.java   
/**
 * 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.
 */
public IQRequestHandler registerIQRequestHandler(IQRequestHandler iqRequestHandler);
项目:Smack    文件:XMPPConnection.java   
/**
 * Convenience method for {@link #unregisterIQRequestHandler(String, String, org.jivesoftware.smack.packet.IQ.Type)}.
 *
 * @param iqRequestHandler
 * @return the previously registered IQ request handler or null.
 */
public IQRequestHandler unregisterIQRequestHandler(IQRequestHandler iqRequestHandler);
项目:Smack    文件:XMPPConnection.java   
/**
 * 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.
 */
public IQRequestHandler unregisterIQRequestHandler(String element, String namespace, IQ.Type type);