@Override public void process(Packet packet) throws PacketException { Component component = getNextComponent(); component.processPacket(packet); } }
/** * 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); }
@Override public void process(Packet packet) throws PacketException { Component component = getNextComponent(); component.processPacket(packet); } }
public void run() { if (packet instanceof IQ) { IQ iq = (IQ) packet; IQ.Type iqType = iq.getType(); if (IQ.Type.result == iqType || IQ.Type.error == iqType) { // The server got an answer to an IQ packet that was sent from the component IQResultListener iqResultListener = resultListeners.remove(iq.getID()); resultTimeout.remove(iq.getID()); if (iqResultListener != null) { try { iqResultListener.receivedAnswer(iq); } catch (Exception e) { manager.getLog().error("Error processing answer of remote entity", e); } return; } } } component.processPacket(packet); } });
/** * 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); }