本文整理匯總了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();