/** * Pause the endpoint, which will stop it accepting new connections and * unlock the acceptor. */ public void pause() { if (running && !paused) { paused = true; releaseConnectionLatch(); unlockAccept(); getHandler().pause(); } }
@Override public void close() { getEndpoint().getHandler().release(this); synchronized (closedLock) { // APR typically crashes if the same socket is closed twice so // make sure that doesn't happen. if (closed) { return; } closed = true; if (sslOutputBuffer != null) { ByteBufferUtils.cleanDirectBuffer(sslOutputBuffer); } ((AprEndpoint) getEndpoint()).getPoller().close(getSocket().longValue()); } }