public void addInterceptor(PacketInterceptor interceptor) {
        if (interceptor == null) {
            throw new NullPointerException("Parameter interceptor was null.");
        }
        // Remove the interceptor from the list since the position might have changed
        if (globalInterceptors.contains(interceptor)) {
            globalInterceptors.remove(interceptor);
        }
        globalInterceptors.add(interceptor);
    }
Inserts a new interceptor at the end of the list of currently configured
interceptors. This interceptor will be used for all the sent and received packets.

@param interceptor the interceptor to add.
xmppserver/src/main/java/org/jivesoftware/openfire/interceptor/InterceptorManager.java