@Override
    public int getPort( ConnectionType type, boolean startInDirectTlsMode )
    {
        return getListener( type, startInDirectTlsMode ).getPort();
    }
Retrieves the configured TCP port on which a listener accepts connections.

@param type The connection type for which a listener is to be configured.
@param startInDirectTlsMode true when the listener to be configured is in DirectTLS mode, otherwise false.
@return a port number.
xmppserver/src/main/java/org/jivesoftware/openfire/spi/ConnectionManagerImpl.java