public class AprEndpoint extends AbstractEndpoint<Long>
| Modifier and Type | Class and Description | 
|---|---|
| protected class  | AprEndpoint.AcceptorThe background thread that listens for incoming TCP/IP connections and
 hands them off to an appropriate processor. | 
| protected class  | AprEndpoint.AsyncTimeoutAsync timeout thread | 
| static interface  | AprEndpoint.HandlerBare bones interface used for socket processing. | 
| class  | AprEndpoint.Poller | 
| class  | AprEndpoint.Sendfile | 
| static class  | AprEndpoint.SendfileDataSendfileData class. | 
| static class  | AprEndpoint.SocketInfo | 
| static class  | AprEndpoint.SocketList | 
| protected class  | AprEndpoint.SocketProcessorThis class is the equivalent of the Worker, but will simply use in an
 external Executor thread pool. | 
| static class  | AprEndpoint.SocketTimeouts | 
| protected class  | AprEndpoint.SocketWithOptionsProcessorThis class is the equivalent of the Worker, but will simply use in an
 external Executor thread pool. | 
AbstractEndpoint.BindState| Modifier and Type | Field and Description | 
|---|---|
| protected AprEndpoint.AsyncTimeout | asyncTimeoutThe socket poller. | 
| protected boolean | deferAcceptDefer accept. | 
| protected AprEndpoint.Handler | handlerHandling of accepted sockets. | 
| protected AprEndpoint.Poller | pollerThe socket poller. | 
| protected int | pollTimePoll interval, in microseconds. | 
| protected long | rootPoolRoot APR memory pool. | 
| protected AprEndpoint.Sendfile | sendfileThe static file sender. | 
| protected int | sendfileSizeSize of the sendfile (= concurrent files which can be served). | 
| protected int | sendfileThreadCountSendfile thread count. | 
| protected long | serverSockServer socket "pointer". | 
| protected long | serverSockPoolAPR memory pool for the server socket. | 
| protected String | SSLCACertificateFileSSL CA certificate file. | 
| protected String | SSLCACertificatePathSSL CA certificate path. | 
| protected String | SSLCARevocationFileSSL CA revocation file. | 
| protected String | SSLCARevocationPathSSL CA revocation path. | 
| protected String | SSLCertificateChainFileSSL certificate chain file. | 
| protected String | SSLCertificateFileSSL certificate file. | 
| protected String | SSLCertificateKeyFileSSL certificate key file. | 
| protected String | SSLCipherSuiteSSL cipher suite. | 
| protected long | sslContextSSL context. | 
| protected boolean | SSLDisableCompressionDisables compression of the SSL stream. | 
| protected boolean | SSLHonorCipherOrder | 
| protected boolean | SSLInsecureRenegotiationSSL allow insecure renegotiation for the the client that does not
 support the secure renegotiation. | 
| protected String | SSLPasswordSSL password (if a cert is encrypted, and no password has been provided, a callback
 will ask for a password). | 
| protected String | SSLProtocolSSL protocols. | 
| protected String | SSLVerifyClientSSL verify client. | 
| protected int | SSLVerifyDepthSSL verify depth. | 
| protected boolean | useCometAllow comet request handling. | 
| protected boolean | useSendfileUse sendfile for sending static files. | 
| protected ConcurrentLinkedQueue<SocketWrapper<Long>> | waitingRequests | 
acceptors, acceptorThreadCount, acceptorThreadPriority, attributes, internalExecutor, paused, running, sm, socketProperties, threadPriority| Constructor and Description | 
|---|
| AprEndpoint() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected long | allocatePoller(int size,
              long pool,
              int timeout)Allocate a new poller of the specified size. | 
| void | bind()Initialize the endpoint. | 
| protected AbstractEndpoint.Acceptor | createAcceptor()Hook to allow Endpoints to provide a specific Acceptor implementation. | 
| AprEndpoint.AsyncTimeout | getAsyncTimeout() | 
| boolean | getDeferAccept() | 
| AprEndpoint.Handler | getHandler() | 
| int | getKeepAliveCount()Obtain the number of kept alive sockets. | 
| int | getLocalPort()Port in use. | 
| protected Log | getLog() | 
| AprEndpoint.Poller | getPoller() | 
| int | getPollTime() | 
| AprEndpoint.Sendfile | getSendfile() | 
| int | getSendfileCount()Obtain the number of sendfile sockets. | 
| int | getSendfileSize() | 
| int | getSendfileThreadCount() | 
| String | getSSLCACertificateFile() | 
| String | getSSLCACertificatePath() | 
| String | getSSLCARevocationFile() | 
| String | getSSLCARevocationPath() | 
| String | getSSLCertificateChainFile() | 
| String | getSSLCertificateFile() | 
| String | getSSLCertificateKeyFile() | 
| String | getSSLCipherSuite() | 
| boolean | getSSLDisableCompression() | 
| boolean | getSSLHonorCipherOrder() | 
| boolean | getSSLInsecureRenegotiation() | 
| String | getSSLPassword() | 
| String | getSSLProtocol() | 
| protected static Set<String> | getSslProtocolAll() | 
| String | getSSLVerifyClient() | 
| int | getSSLVerifyDepth() | 
| boolean | getUseComet() | 
| boolean | getUseCometTimeout() | 
| boolean | getUsePolling() | 
| boolean | getUseSendfile() | 
| boolean | processSocket(long socket,
             SocketStatus status)Process given socket. | 
| void | processSocketAsync(SocketWrapper<Long> socket,
                  SocketStatus status) | 
| protected boolean | processSocketWithOptions(long socket)Process given socket. | 
| void | removeWaitingRequest(SocketWrapper<Long> socketWrapper) | 
| void | setDeferAccept(boolean deferAccept) | 
| void | setHandler(AprEndpoint.Handler handler) | 
| void | setMaxConnections(int maxConnections)This endpoint does not support  -1for unlimited connections,
 nor does it support setting this attribute while the endpoint is running. | 
| void | setPollTime(int pollTime) | 
| void | setSendfileSize(int sendfileSize) | 
| void | setSendfileThreadCount(int sendfileThreadCount) | 
| protected boolean | setSocketOptions(long socket)Process the specified connection. | 
| void | setSSLCACertificateFile(String SSLCACertificateFile) | 
| void | setSSLCACertificatePath(String SSLCACertificatePath) | 
| void | setSSLCARevocationFile(String SSLCARevocationFile) | 
| void | setSSLCARevocationPath(String SSLCARevocationPath) | 
| void | setSSLCertificateChainFile(String SSLCertificateChainFile) | 
| void | setSSLCertificateFile(String SSLCertificateFile) | 
| void | setSSLCertificateKeyFile(String SSLCertificateKeyFile) | 
| void | setSSLCipherSuite(String SSLCipherSuite) | 
| void | setSSLDisableCompression(boolean SSLDisableCompression)Set to  trueto disable SSL compression. | 
| void | setSSLHonorCipherOrder(boolean SSLHonorCipherOrder)Set to  trueto enforce the server's cipher order
 instead of the default which is to allow the client to choose a
 preferred cipher. | 
| void | setSSLInsecureRenegotiation(boolean SSLInsecureRenegotiation) | 
| void | setSSLPassword(String SSLPassword) | 
| void | setSSLProtocol(String SSLProtocol) | 
| void | setSSLVerifyClient(String SSLVerifyClient) | 
| void | setSSLVerifyDepth(int SSLVerifyDepth) | 
| void | setUseComet(boolean useComet) | 
| void | setUseSendfile(boolean useSendfile) | 
| void | startInternal()Start the APR endpoint, creating acceptor, poller and sendfile threads. | 
| void | stopInternal()Stop the endpoint. | 
| void | unbind()Deallocate APR memory pools, and close server socket. | 
configureUseServerCipherSuitesOrder, countDownConnection, countUpOrAwaitConnection, createExecutor, destroy, getAcceptorThreadCount, getAcceptorThreadPriority, getAddress, getAlgorithm, getAllowUnsafeLegacyRenegotiation, getAttribute, getBacklog, getBindOnInit, getCiphers, getClientAuth, getConnectionCount, getCrlFile, getCurrentThreadCount, getCurrentThreadsBusy, getDaemon, getExecutor, getExecutorTerminationTimeoutMillis, getKeepAliveTimeout, getKeyAlias, getKeyPass, getKeystoreFile, getKeystorePass, getKeystoreProvider, getKeystoreType, getMaxConnections, getMaxHeaderCount, getMaxKeepAliveRequests, getMaxThreads, getMaxThreadsInternal, getMaxThreadsWithExecutor, getMinSpareThreads, getName, getPort, getProperty, getSessionCacheSize, getSessionTimeout, getSocketProperties, getSoLinger, getSoTimeout, getSslEnabledProtocolsArray, getSslProtocol, getTcpNoDelay, getThreadPriority, getTrustManagerClassName, getTrustMaxCertLength, getTruststoreAlgorithm, getTruststoreFile, getTruststorePass, getTruststoreProvider, getTruststoreType, getUseServerCipherSuitesOrder, handleExceptionWithDelay, init, initializeConnectionLatch, isPaused, isRunning, isSSLEnabled, pause, releaseConnectionLatch, resume, setAcceptorThreadCount, setAcceptorThreadPriority, setAddress, setAlgorithm, setAllowUnsafeLegacyRenegotiation, setAttribute, setBacklog, setBindOnInit, setCiphers, setClientAuth, setCrlFile, setDaemon, setExecutor, setExecutorTerminationTimeoutMillis, setKeepAliveTimeout, setKeyAlias, setKeyPass, setKeystoreFile, setKeystorePass, setKeystoreProvider, setKeystoreType, setMaxHeaderCount, setMaxKeepAliveRequests, setMaxThreads, setMinSpareThreads, setName, setPort, setProperty, setSessionCacheSize, setSessionTimeout, setSoLinger, setSoTimeout, setSSLEnabled, setSslEnabledProtocols, setSslProtocol, setTcpNoDelay, setThreadPriority, setTrustManagerClassName, setTrustMaxCertLength, setTruststoreAlgorithm, setTruststoreFile, setTruststorePass, setTruststoreProvider, setTruststoreType, setUseServerCipherSuitesOrder, shutdownExecutor, start, startAcceptorThreads, stop, unlockAcceptprotected long rootPool
protected long serverSock
protected long serverSockPool
protected long sslContext
protected ConcurrentLinkedQueue<SocketWrapper<Long>> waitingRequests
protected boolean deferAccept
protected int sendfileSize
protected AprEndpoint.Handler handler
protected int pollTime
protected boolean useSendfile
protected boolean useComet
protected int sendfileThreadCount
protected AprEndpoint.Poller poller
protected AprEndpoint.AsyncTimeout asyncTimeout
protected AprEndpoint.Sendfile sendfile
protected String SSLProtocol
protected String SSLPassword
protected String SSLCipherSuite
protected String SSLCertificateFile
protected String SSLCertificateKeyFile
protected String SSLCertificateChainFile
protected String SSLCACertificatePath
protected String SSLCACertificateFile
protected String SSLCARevocationPath
protected String SSLCARevocationFile
protected String SSLVerifyClient
protected int SSLVerifyDepth
protected boolean SSLInsecureRenegotiation
protected boolean SSLHonorCipherOrder
protected boolean SSLDisableCompression
public void removeWaitingRequest(SocketWrapper<Long> socketWrapper)
removeWaitingRequest in class AbstractEndpoint<Long>public void setDeferAccept(boolean deferAccept)
public boolean getDeferAccept()
getDeferAccept in class AbstractEndpoint<Long>public void setSendfileSize(int sendfileSize)
public int getSendfileSize()
public void setHandler(AprEndpoint.Handler handler)
public AprEndpoint.Handler getHandler()
public int getPollTime()
public void setPollTime(int pollTime)
public void setUseSendfile(boolean useSendfile)
public boolean getUseSendfile()
getUseSendfile in class AbstractEndpoint<Long>public void setUseComet(boolean useComet)
public boolean getUseComet()
getUseComet in class AbstractEndpoint<Long>public boolean getUseCometTimeout()
getUseCometTimeout in class AbstractEndpoint<Long>public boolean getUsePolling()
getUsePolling in class AbstractEndpoint<Long>public void setSendfileThreadCount(int sendfileThreadCount)
public int getSendfileThreadCount()
public AprEndpoint.Poller getPoller()
public AprEndpoint.AsyncTimeout getAsyncTimeout()
public AprEndpoint.Sendfile getSendfile()
public String getSSLProtocol()
public void setSSLProtocol(String SSLProtocol)
public String getSSLPassword()
public void setSSLPassword(String SSLPassword)
public String getSSLCipherSuite()
public void setSSLCipherSuite(String SSLCipherSuite)
public String getSSLCertificateFile()
public void setSSLCertificateFile(String SSLCertificateFile)
public String getSSLCertificateKeyFile()
public void setSSLCertificateKeyFile(String SSLCertificateKeyFile)
public String getSSLCertificateChainFile()
public void setSSLCertificateChainFile(String SSLCertificateChainFile)
public String getSSLCACertificatePath()
public void setSSLCACertificatePath(String SSLCACertificatePath)
public String getSSLCACertificateFile()
public void setSSLCACertificateFile(String SSLCACertificateFile)
public String getSSLCARevocationPath()
public void setSSLCARevocationPath(String SSLCARevocationPath)
public String getSSLCARevocationFile()
public void setSSLCARevocationFile(String SSLCARevocationFile)
public String getSSLVerifyClient()
public void setSSLVerifyClient(String SSLVerifyClient)
public int getSSLVerifyDepth()
public void setSSLVerifyDepth(int SSLVerifyDepth)
public void setSSLInsecureRenegotiation(boolean SSLInsecureRenegotiation)
public boolean getSSLInsecureRenegotiation()
public void setSSLHonorCipherOrder(boolean SSLHonorCipherOrder)
true to enforce the server's cipher order
 instead of the default which is to allow the client to choose a
 preferred cipher.public boolean getSSLHonorCipherOrder()
public void setSSLDisableCompression(boolean SSLDisableCompression)
true to disable SSL compression. This thwarts CRIME
 attack.public boolean getSSLDisableCompression()
public int getLocalPort()
getLocalPort in class AbstractEndpoint<Long>public void setMaxConnections(int maxConnections)
-1 for unlimited connections,
 nor does it support setting this attribute while the endpoint is running.
 setMaxConnections in class AbstractEndpoint<Long>public int getKeepAliveCount()
public int getSendfileCount()
public void bind()
          throws Exception
bind in class AbstractEndpoint<Long>Exceptionpublic void startInternal()
                   throws Exception
startInternal in class AbstractEndpoint<Long>Exceptionpublic void stopInternal()
stopInternal in class AbstractEndpoint<Long>public void unbind()
            throws Exception
unbind in class AbstractEndpoint<Long>Exceptionprotected AbstractEndpoint.Acceptor createAcceptor()
AbstractEndpointcreateAcceptor in class AbstractEndpoint<Long>protected boolean setSocketOptions(long socket)
protected long allocatePoller(int size,
                  long pool,
                  int timeout)
size - The sizepool - The pool from which the poller will be allocatedtimeout - The timeoutprotected boolean processSocketWithOptions(long socket)
socket - The sockettrue if the socket was correctly configured
  and processing may continue, false if the socket needs to be
  close immediatelypublic boolean processSocket(long socket,
                    SocketStatus status)
public void processSocketAsync(SocketWrapper<Long> socket, SocketStatus status)
processSocketAsync in class AbstractEndpoint<Long>protected Log getLog()
getLog in class AbstractEndpoint<Long>Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.