@Override
    public Set<ConnectionListener> getListeners( ConnectionType type )
    {
        final Set<ConnectionListener> result = new HashSet<>();
        switch ( type )
        {
            case SOCKET_C2S:
                result.add( clientListener );
                result.add( clientSslListener );
                break;

            case BOSH_C2S:
                result.add( boshListener );
                result.add( boshSslListener );
                break;

            case SOCKET_S2S:
                result.add( serverListener );
                result.add( serverSslListener );
                break;

            case COMPONENT:
                result.add( componentListener );
                result.add( componentSslListener );
                break;

            case CONNECTION_MANAGER:
                result.add( connectionManagerListener );
                result.add( connectionManagerSslListener );
                break;

            case WEBADMIN:
                result.add( webAdminListener );
                result.add( webAdminSslListener );
                break;

            default:
                throw new IllegalStateException( "Unknown connection type: "+ type );
        }

        return result;
    }
Returns al connection listeners for the provided type.

@param type The connection type for which a listener is to be configured.
@return The connection listener (never null).
xmppserver/src/main/java/org/jivesoftware/openfire/spi/ConnectionManagerImpl.java