@Override public void process(Packet packet) { // Queue the packet. Another process will process the queued packets. packets.add(packet.createCopy()); }
private void writePacket(Packet packet, Session session) { if (!closed) { // Add to the logging queue this new entry that will be saved later logQueue.add(new AuditPacket(packet.createCopy(), session)); } }
unacknowledgedServerStanzas.addLast( new StreamManager.UnackedPacket( x, packet.createCopy() ) );
public void route(Packet packet) { Set<String> remoteServers = new HashSet<>(); List<String> targets = new ArrayList<>(); Packet localBroadcast = packet.createCopy(); Element addresses = getAddresses(localBroadcast); String localDomain = "@" + server.getServerInfo().getXMPPDomain();
/** * Generate a conflict packet to indicate that the nickname being requested/used is already in * use by another user. * * @param packet the packet to be bounced. * @param error the reason why the operation failed. */ private void sendErrorPacket(Packet packet, PacketError.Condition error) { if (packet instanceof IQ) { IQ reply = IQ.createResultIQ((IQ) packet); reply.setChildElement(((IQ) packet).getChildElement().createCopy()); reply.setError(error); router.route(reply); } else { Packet reply = packet.createCopy(); reply.setError(error); reply.setFrom(packet.getTo()); reply.setTo(packet.getFrom()); router.route(reply); } }
@Override public void process(Packet packet) { // Queue the packet. Another process will process the queued packets. packets.add(packet.createCopy()); }
private void writePacket(Packet packet, Session session) { if (!closed) { // Add to the logging queue this new entry that will be saved later logQueue.add(new AuditPacket(packet.createCopy(), session)); } }
unacknowledgedServerStanzas.addLast( new StreamManager.UnackedPacket( x, packet.createCopy() ) );
public void route(Packet packet) { Set<String> remoteServers = new HashSet<>(); List<String> targets = new ArrayList<>(); Packet localBroadcast = packet.createCopy(); Element addresses = getAddresses(localBroadcast); String localDomain = "@" + server.getServerInfo().getXMPPDomain();
/** * @see org.xmpp.component.Component#processPacket(org.xmpp.packet.Packet) */ final public void processPacket(final Packet packet) { final Packet copy = packet.createCopy(); if (executor == null) { } try { executor.execute(new PacketProcessor(copy)); } catch (RejectedExecutionException ex) { log.error("(serving component '" + getName() + "') Unable to process packet! " + "Is the thread pool queue exhausted? " + "Packet dropped in component '" + getName() + "'. Packet that's dropped: " + packet.toXML(), ex); // If the original packet was an IQ request, we should return an // error. if (packet instanceof IQ && ((IQ) packet).isRequest()) { final IQ response = IQ.createResultIQ((IQ) packet); response.setError(Condition.internal_server_error); send(response); } } }
/** * Generate a conflict packet to indicate that the nickname being requested/used is already in * use by another user. * * @param packet the packet to be bounced. * @param error the reason why the operation failed. */ private void sendErrorPacket(Packet packet, PacketError.Condition error) { if (packet instanceof IQ) { IQ reply = IQ.createResultIQ((IQ) packet); reply.setChildElement(((IQ) packet).getChildElement().createCopy()); reply.setError(error); router.route(reply); } else { Packet reply = packet.createCopy(); reply.setError(error); reply.setFrom(packet.getTo()); reply.setTo(packet.getFrom()); router.route(reply); } }