public void stopAcceptThread() throws InterruptedException
    {
        acceptor.stop();
        acceptThread.interrupt();
        acceptThread.join(SO_TIMEOUT.multipliedBy(20).toMillis());

        final Thread.State finalState = acceptThread.getState();
        if (finalState != Thread.State.TERMINATED) {
            if (doLog) System.err.println("Accept thread not terminating after it was stopped. Current state: " + finalState);
            if (doLog) Arrays.stream(acceptThread.getStackTrace()).forEach(System.err::println);
        }
        acceptThread = null;
    }
Get the port on which this instance is accepting sockets.

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