public int getPort() throws IOException
    {
        if (server == null) {
            throw new IllegalStateException("Server not yet running. Did you call 'open()'?");
        }
        return server.getLocalPort();
    }
Get the port on which this instance is accepting sockets.

@return a port number.
xmppserver/src/test/java/org/jivesoftware/openfire/session/RemoteReceivingServerDummy.java