本文整理汇总了Java中org.xmpp.component.Component.processPacket方法的典型用法代码示例。如果您正苦于以下问题:Java Component.processPacket方法的具体用法?Java Component.processPacket怎么用?Java Component.processPacket使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.xmpp.component.Component
的用法示例。
在下文中一共展示了Component.processPacket方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkDiscoSupport
import org.xmpp.component.Component; //导入方法依赖的package包/类
/**
* Send a disco#info request to the new component. If the component provides information
* then it will be added to the list of discoverable server items.
*
* @param component the new component that was added to this manager.
* @param componentJID the XMPP address of the new component.
*/
private void checkDiscoSupport(Component component, JID componentJID) {
// Build a disco#info request that will be sent to the component
IQ iq = new IQ(IQ.Type.get);
iq.setFrom(getAddress());
iq.setTo(componentJID);
iq.setChildElement("query", "http://jabber.org/protocol/disco#info");
// Send the disco#info request to the component. The reply (if any) will be processed in
// #process(Packet)
// sendPacket(component, iq);
component.processPacket(iq);
}
示例2: process
import org.xmpp.component.Component; //导入方法依赖的package包/类
@Override
public void process(Packet packet) throws PacketException {
Component component = getNextComponent();
component.processPacket(packet);
}
示例3: process
import org.xmpp.component.Component; //导入方法依赖的package包/类
public void process(Packet packet) throws PacketException {
Component component = getNextComponent();
component.processPacket(packet);
}