public synchronized void start()
    {
        // TODO Start all connection types here, by supplying more connection acceptors other than a Netty-based one.
        switch ( getType() )
        {
            case BOSH_C2S:
            case WEBADMIN:
                Log.debug( "Not starting a (Netty-based) connection acceptor, as connections of type " + getType() + " depend on another IO technology.");
                return;

            default:
        }

        if ( !isEnabled() )
        {
            Log.debug( "Not starting: disabled by configuration." );
            return;
        }

        if ( connectionAcceptor != null )
        {
            // This might indicate an illegal state. Legacy code allows for this, so we won't throw a runtime exception (for now).
            if ( !connectionAcceptor.isIdle() )
            {
                Log.warn( "Unable to start: it appears to have already been started (and it is currently serving connections)! To restart, first stop this listener explicitly." );
                return;
            }
            else
            {
                Log.warn( "Stopping (in order to restart) an instance that has already been started, but is idle. This start would have failed if the listener was not idle. The implementation should have called stop() or restart() first, to ensure a clean restart!" );
                eventListeners.forEach(eventListener -> {
                    try {
                        eventListener.acceptorStopping(connectionAcceptor);
                    } catch (Throwable t) {
                        Log.warn("SocketAcceptorEventListener '{}' threw exception while processing acceptor stopping event for acceptor: {}", eventListener, connectionAcceptor, t);
                    }
                });
                connectionAcceptor.stop();
            }
        }

        Log.debug( "Starting..." );
        connectionAcceptor = new NettyConnectionAcceptor(generateConnectionConfiguration());
        eventListeners.forEach(eventListener -> {
            try {
                eventListener.acceptorStarting(connectionAcceptor);
            } catch (Throwable t) {
                Log.warn("SocketAcceptorEventListener '{}' threw exception while processing acceptor stopping event for acceptor: {}", eventListener, connectionAcceptor, t);
            }
        });
        connectionAcceptor.start();
        Log.info( "Started." );
    }
Attempts to start the connection acceptor, creating a new instance when needed.

An invocation of this method does not change the configuration for this connection. As a result, an acceptor will
<em>not</em> be started when the listener is not enabled (in such cases, an invocation of this method has no
effect).

In order to start this listener and persist this as the desired state for this connection, use #enable(true).

This method should not be called when an acceptor has already been started (instead, {@link #restart()} should be
used to explicitly define the need to stop a previous connection). The current implementation of this method will
stop a pre-existing acceptor, but only when it is currently not serving connections. When the acceptor is not
idle, this method has no effect. This behavior might change in the future.
xmppserver/src/main/java/org/jivesoftware/openfire/spi/ConnectionListener.java