public class AprEndpoint extends AbstractEndpoint<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 |
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.
|
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 String |
SSLCACertificateFile
SSL CA certificate file.
|
protected String |
SSLCACertificatePath
SSL CA certificate path.
|
protected String |
SSLCARevocationFile
SSL CA revocation file.
|
protected String |
SSLCARevocationPath
SSL CA revocation path.
|
protected String |
SSLCertificateChainFile
SSL certificate chain file.
|
protected String |
SSLCertificateFile
SSL certificate file.
|
protected String |
SSLCertificateKeyFile
SSL certificate key file.
|
protected String |
SSLCipherSuite
SSL cipher suite.
|
protected long |
sslContext
SSL context.
|
protected boolean |
SSLDisableCompression
Disables compression of the SSL stream.
|
protected boolean |
SSLHonorCipherOrder |
protected boolean |
SSLInsecureRenegotiation
SSL allow insecure renegotiation for the the client that does not
support the secure renegotiation.
|
protected String |
SSLPassword
SSL password (if a cert is encrypted, and no password has been provided, a callback
will ask for a password).
|
protected String |
SSLProtocol
SSL protocols.
|
protected 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.
|
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() |
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() |
String |
getSSLVerifyClient() |
int |
getSSLVerifyDepth() |
boolean |
getUseComet() |
boolean |
getUseCometTimeout() |
boolean |
getUsePolling() |
boolean |
getUseSendfile() |
boolean |
processSocket(long socket,
SocketStatus status)
Process given socket.
|
void |
processSocket(SocketWrapper<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(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
true to disable SSL compression. |
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(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.
|
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, getMaxThreadsExecutor, getMinSpareThreads, getName, getPort, getProperty, getSessionCacheSize, getSessionTimeout, getSocketProperties, getSoLinger, getSoTimeout, getSslEnabledProtocolsArray, getSslProtocol, getTcpNoDelay, getThreadPriority, getTrustManagerClassName, getTrustMaxCertLength, getTruststoreAlgorithm, getTruststoreFile, getTruststorePass, getTruststoreProvider, getTruststoreType, handleExceptionWithDelay, init, initializeConnectionLatch, isPaused, isRunning, isSSLEnabled, pause, releaseConnectionLatch, 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, shutdownExecutor, start, startAcceptorThreads, stop, unlockAccept
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 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 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.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 String[] getCiphersUsed()
getCiphersUsed
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>
Exception
public long getJniSslContext()
public void startInternal() throws Exception
startInternal
in class AbstractEndpoint<Long>
Exception
public void stopInternal()
stopInternal
in class AbstractEndpoint<Long>
public void unbind() throws Exception
unbind
in class AbstractEndpoint<Long>
Exception
protected AbstractEndpoint.Acceptor createAcceptor()
AbstractEndpoint
createAcceptor
in class AbstractEndpoint<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<Long> socket, SocketStatus status, boolean dispatch)
AbstractEndpoint
processSocket
in class AbstractEndpoint<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<Long>
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.