@Override
    public void interceptPacket(Packet packet, Session session, boolean incoming, boolean processed)
            throws PacketRejectedException {
        // Queue intercepted packet only if there are subscribers interested
        if (!subscribers.isEmpty()) {
            boolean queue = false;
            Class<? extends Packet> packetClass = packet.getClass();
            for (Subscription subscription : subscribers.values()) {
                if (subscription.isPresenceEnabled() && packetClass == Presence.class) {
                    queue = true;
                }
                else if (subscription.isMessageEnabled() && packetClass == Message.class) {
                    queue = true;
                }
                else if (subscription.isIQEnabled() && packetClass == IQ.class) {
                    queue = true;
                }
            }
            if (queue) {
                // Queue packet with extra information and let the background thread process it
                packetQueue.add(new InterceptedPacket(packet, incoming, processed));
            }
        }
    }
Removes the subscription of the specified component.

@param componentJID the address of the component connected to the server.
xmppserver/src/main/java/org/jivesoftware/openfire/interceptor/PacketCopier.java