public class AprEndpoint extends AbstractEndpoint<java.lang.Long>
Modifier and Type | Class and Description |
---|---|
protected class |
AprEndpoint.Acceptor
The background thread that listens for incoming TCP/IP connections and
hands them off to an appropriate processor.
|
static interface |
AprEndpoint.Handler
Bare bones interface used for socket processing.
|
class |
AprEndpoint.Poller |
class |
AprEndpoint.Sendfile |
static class |
AprEndpoint.SendfileData
SendfileData class.
|
static class |
AprEndpoint.SocketInfo |
static class |
AprEndpoint.SocketList |
protected class |
AprEndpoint.SocketProcessor
This class is the equivalent of the Worker, but will simply use in an
external Executor thread pool.
|
static class |
AprEndpoint.SocketTimeouts |
protected class |
AprEndpoint.SocketWithOptionsProcessor
This class is the equivalent of the Worker, but will simply use in an
external Executor thread pool.
|
AbstractEndpoint.AsyncTimeout, AbstractEndpoint.BindState
Modifier and Type | Field and Description |
---|---|
protected boolean |
deferAccept
Defer accept.
|
protected AprEndpoint.Handler |
handler
Handling of accepted sockets.
|
protected AprEndpoint.Poller |
poller
The socket poller.
|
protected int |
pollTime
Poll interval, in microseconds.
|
protected long |
rootPool
Root APR memory pool.
|
protected AprEndpoint.Sendfile |
sendfile
The static file sender.
|
protected int |
sendfileSize
Size of the sendfile (= concurrent files which can be served).
|
protected int |
sendfileThreadCount
Sendfile thread count.
|
protected long |
serverSock
Server socket "pointer".
|
protected long |
serverSockPool
APR memory pool for the server socket.
|
protected static java.util.Set<java.lang.String> |
SSL_PROTO_ALL |
protected java.lang.String |
SSLCACertificateFile
SSL CA certificate file.
|
protected java.lang.String |
SSLCACertificatePath
SSL CA certificate path.
|
protected java.lang.String |
SSLCARevocationFile
SSL CA revocation file.
|
protected java.lang.String |
SSLCARevocationPath
SSL CA revocation path.
|
protected java.lang.String |
SSLCertificateChainFile
SSL certificate chain file.
|
protected java.lang.String |
SSLCertificateFile
SSL certificate file.
|
protected java.lang.String |
SSLCertificateKeyFile
SSL certificate key file.
|
protected java.lang.String |
SSLCipherSuite
SSL cipher suite.
|
protected long |
sslContext
SSL context.
|
protected boolean |
SSLDisableCompression
Disables compression of the SSL stream.
|
protected boolean |
SSLDisableSessionTickets
SSL disable TLS Session Tickets (RFC 4507).
|
protected boolean |
SSLHonorCipherOrder |
protected boolean |
SSLInsecureRenegotiation
SSL allow insecure renegotiation for the the client that does not
support the secure renegotiation.
|
protected java.lang.String |
SSLPassword
SSL password (if a cert is encrypted, and no password has been provided, a callback
will ask for a password).
|
protected java.lang.String |
SSLProtocol
SSL protocols.
|
protected java.lang.String |
SSLVerifyClient
SSL verify client.
|
protected int |
SSLVerifyDepth
SSL verify depth.
|
protected boolean |
useComet
Allow comet request handling.
|
protected boolean |
useSendfile
Use sendfile for sending static files.
|
acceptors, acceptorThreadCount, acceptorThreadPriority, attributes, DEFAULT_CIPHERS, internalExecutor, paused, running, sm, socketProperties, threadPriority, waitingRequests
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.
|
java.lang.String[] |
getCiphersUsed() |
boolean |
getDeferAccept() |
AprEndpoint.Handler |
getHandler() |
long |
getJniSslContext() |
int |
getKeepAliveCount()
Number of keepalive sockets.
|
int |
getLocalPort()
Port in use.
|
protected Log |
getLog() |
AprEndpoint.Poller |
getPoller() |
int |
getPollTime() |
AprEndpoint.Sendfile |
getSendfile() |
int |
getSendfileCount()
Number of sendfile sockets.
|
int |
getSendfileSize() |
int |
getSendfileThreadCount() |
java.lang.String |
getSSLCACertificateFile() |
java.lang.String |
getSSLCACertificatePath() |
java.lang.String |
getSSLCARevocationFile() |
java.lang.String |
getSSLCARevocationPath() |
java.lang.String |
getSSLCertificateChainFile() |
java.lang.String |
getSSLCertificateFile() |
java.lang.String |
getSSLCertificateKeyFile() |
java.lang.String |
getSSLCipherSuite() |
boolean |
getSSLDisableCompression() |
boolean |
getSSLDisableSessionTickets() |
boolean |
getSSLHonorCipherOrder() |
boolean |
getSSLInsecureRenegotiation() |
java.lang.String |
getSSLPassword() |
java.lang.String |
getSSLProtocol() |
java.lang.String |
getSSLVerifyClient() |
int |
getSSLVerifyDepth() |
boolean |
getUseComet() |
boolean |
getUseCometTimeout() |
boolean |
getUsePolling() |
boolean |
getUseSendfile() |
boolean |
processSocket(long socket,
SocketStatus status)
Process given socket.
|
void |
processSocket(SocketWrapper<java.lang.Long> socket,
SocketStatus status,
boolean dispatch)
Process the given SocketWrapper with the given status.
|
protected boolean |
processSocketWithOptions(long socket)
Process given socket.
|
void |
setDeferAccept(boolean deferAccept) |
void |
setHandler(AprEndpoint.Handler handler) |
void |
setMaxConnections(int maxConnections)
This endpoint does not support
-1 for 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(java.lang.String SSLCACertificateFile) |
void |
setSSLCACertificatePath(java.lang.String SSLCACertificatePath) |
void |
setSSLCARevocationFile(java.lang.String SSLCARevocationFile) |
void |
setSSLCARevocationPath(java.lang.String SSLCARevocationPath) |
void |
setSSLCertificateChainFile(java.lang.String SSLCertificateChainFile) |
void |
setSSLCertificateFile(java.lang.String SSLCertificateFile) |
void |
setSSLCertificateKeyFile(java.lang.String SSLCertificateKeyFile) |
void |
setSSLCipherSuite(java.lang.String SSLCipherSuite) |
void |
setSSLDisableCompression(boolean SSLDisableCompression)
Set to
true to disable SSL compression. |
void |
setSSLDisableSessionTickets(boolean SSLDisableSessionTickets) |
void |
setSSLHonorCipherOrder(boolean SSLHonorCipherOrder)
Set to
true to 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(java.lang.String SSLPassword) |
void |
setSSLProtocol(java.lang.String SSLProtocol) |
void |
setSSLVerifyClient(java.lang.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.
|
protected void |
testServerCipherSuitesOrderSupport() |
void |
unbind()
Deallocate APR memory pools, and close server socket.
|
configureUseServerCipherSuitesOrder, countDownConnection, countUpOrAwaitConnection, createExecutor, destroy, executeNonBlockingDispatches, getAcceptorThreadCount, getAcceptorThreadPriority, getAddress, getAlgorithm, getAllowUnsafeLegacyRenegotiation, getAsyncTimeout, 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, removeWaitingRequest, resume, setAcceptorThreadCount, setAcceptorThreadPriority, setAddress, setAlgorithm, setAllowUnsafeLegacyRenegotiation, setAsyncTimeout, 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, unlockAccept
protected static final java.util.Set<java.lang.String> SSL_PROTO_ALL
protected long rootPool
protected long serverSock
protected long serverSockPool
protected long sslContext
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.Sendfile sendfile
protected java.lang.String SSLProtocol
protected java.lang.String SSLPassword
protected java.lang.String SSLCipherSuite
protected java.lang.String SSLCertificateFile
protected java.lang.String SSLCertificateKeyFile
protected java.lang.String SSLCertificateChainFile
protected java.lang.String SSLCACertificatePath
protected java.lang.String SSLCACertificateFile
protected java.lang.String SSLCARevocationPath
protected java.lang.String SSLCARevocationFile
protected boolean SSLDisableSessionTickets
protected java.lang.String SSLVerifyClient
protected int SSLVerifyDepth
protected boolean SSLInsecureRenegotiation
protected boolean SSLHonorCipherOrder
protected boolean SSLDisableCompression
public void setDeferAccept(boolean deferAccept)
public boolean getDeferAccept()
getDeferAccept
in class AbstractEndpoint<java.lang.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<java.lang.Long>
public void setUseComet(boolean useComet)
public boolean getUseComet()
getUseComet
in class AbstractEndpoint<java.lang.Long>
public boolean getUseCometTimeout()
getUseCometTimeout
in class AbstractEndpoint<java.lang.Long>
public boolean getUsePolling()
getUsePolling
in class AbstractEndpoint<java.lang.Long>
public void setSendfileThreadCount(int sendfileThreadCount)
public int getSendfileThreadCount()
public AprEndpoint.Poller getPoller()
public AprEndpoint.Sendfile getSendfile()
public java.lang.String getSSLProtocol()
public void setSSLProtocol(java.lang.String SSLProtocol)
public java.lang.String getSSLPassword()
public void setSSLPassword(java.lang.String SSLPassword)
public java.lang.String getSSLCipherSuite()
public void setSSLCipherSuite(java.lang.String SSLCipherSuite)
public java.lang.String getSSLCertificateFile()
public void setSSLCertificateFile(java.lang.String SSLCertificateFile)
public java.lang.String getSSLCertificateKeyFile()
public void setSSLCertificateKeyFile(java.lang.String SSLCertificateKeyFile)
public java.lang.String getSSLCertificateChainFile()
public void setSSLCertificateChainFile(java.lang.String SSLCertificateChainFile)
public java.lang.String getSSLCACertificatePath()
public void setSSLCACertificatePath(java.lang.String SSLCACertificatePath)
public java.lang.String getSSLCACertificateFile()
public void setSSLCACertificateFile(java.lang.String SSLCACertificateFile)
public java.lang.String getSSLCARevocationPath()
public void setSSLCARevocationPath(java.lang.String SSLCARevocationPath)
public java.lang.String getSSLCARevocationFile()
public void setSSLCARevocationFile(java.lang.String SSLCARevocationFile)
public boolean getSSLDisableSessionTickets()
public void setSSLDisableSessionTickets(boolean SSLDisableSessionTickets)
public java.lang.String getSSLVerifyClient()
public void setSSLVerifyClient(java.lang.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<java.lang.Long>
public java.lang.String[] getCiphersUsed()
getCiphersUsed
in class AbstractEndpoint<java.lang.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<java.lang.Long>
public int getKeepAliveCount()
public int getSendfileCount()
public void bind() throws java.lang.Exception
bind
in class AbstractEndpoint<java.lang.Long>
java.lang.Exception
public long getJniSslContext()
public void startInternal() throws java.lang.Exception
startInternal
in class AbstractEndpoint<java.lang.Long>
java.lang.Exception
public void stopInternal()
stopInternal
in class AbstractEndpoint<java.lang.Long>
public void unbind() throws java.lang.Exception
unbind
in class AbstractEndpoint<java.lang.Long>
java.lang.Exception
protected AbstractEndpoint.Acceptor createAcceptor()
AbstractEndpoint
createAcceptor
in class AbstractEndpoint<java.lang.Long>
protected boolean setSocketOptions(long socket)
protected long allocatePoller(int size, long pool, int timeout)
protected boolean processSocketWithOptions(long socket)
public boolean processSocket(long socket, SocketStatus status)
public void processSocket(SocketWrapper<java.lang.Long> socket, SocketStatus status, boolean dispatch)
AbstractEndpoint
processSocket
in class AbstractEndpoint<java.lang.Long>
socket
- The socket wrapper to processstatus
- The input status to the processingdispatch
- Should the processing be performed on a new
container threadprotected Log getLog()
getLog
in class AbstractEndpoint<java.lang.Long>
protected void testServerCipherSuitesOrderSupport()
testServerCipherSuitesOrderSupport
in class AbstractEndpoint<java.lang.Long>
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.