本文整理汇总了Java中org.jivesoftware.smack.packet.IQ.Type方法的典型用法代码示例。如果您正苦于以下问题:Java IQ.Type方法的具体用法?Java IQ.Type怎么用?Java IQ.Type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jivesoftware.smack.packet.IQ
的用法示例。
在下文中一共展示了IQ.Type方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: unregisterIQRequestHandler
import org.jivesoftware.smack.packet.IQ; //导入方法依赖的package包/类
@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");
}
}
示例2: IQTypeFilter
import org.jivesoftware.smack.packet.IQ; //导入方法依赖的package包/类
private IQTypeFilter(IQ.Type type) {
super(IQ.class);
this.type = Objects.requireNonNull(type, "Type must not be null");
}
示例3: unregisterIQRequestHandler
import org.jivesoftware.smack.packet.IQ; //导入方法依赖的package包/类
/**
* 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);
示例4: getType
import org.jivesoftware.smack.packet.IQ; //导入方法依赖的package包/类
public IQ.Type getType();