@Override
    public ConnectionConfiguration getConfiguration()
    {
        // This is an ugly hack to get backwards compatibility with the pre-MINA era. As this implementation is being
        // removed (it is marked as deprecated - at the time of writing, it is only used for S2S). The ugly hack: assume
        // S2S:
        final ConnectionManager connectionManager = XMPPServer.getInstance().getConnectionManager();
        return connectionManager.getListener( ConnectionType.SOCKET_S2S, false ).generateConnectionConfiguration();
    }
Returns the stream handler responsible for encrypting the plain connection and providing
the corresponding input and output streams.

@return the stream handler responsible for encrypting the plain connection and providing
        the corresponding input and output streams.
xmppserver/src/main/java/org/jivesoftware/openfire/net/SocketConnection.java