Apache Tomcat 7.0.4

org.apache.tomcat.util.net
Class AbstractEndpoint

java.lang.Object
  extended by org.apache.tomcat.util.net.AbstractEndpoint
Direct Known Subclasses:
AprEndpoint, JIoEndpoint, NioEndpoint

public abstract class AbstractEndpoint
extends Object

Author:
fhanik, Mladen Turk, Remy Maucherat

Nested Class Summary
static interface AbstractEndpoint.Handler
          Different types of socket states to react upon
 
Field Summary
static String CERTIFICATE_KEY
          The Request attribute key for the client certificate chain.
static String CIPHER_SUITE_KEY
          The Request attribute key for the cipher suite.
protected  boolean initialized
          Track the initialization state of the endpoint.
protected  boolean internalExecutor
          Are we using an internal executor
static String KEY_SIZE_KEY
          The Request attribute key for the key size.
protected  boolean paused
          Will be set to true whenever the endpoint is paused.
protected  boolean running
          Running state of the endpoint.
static String SESSION_ID_KEY
          The Request attribute key for the session id.
static String SESSION_MGR
          The request attribute key for the session manager.
protected static StringManager sm
           
protected  SocketProperties socketProperties
          Socket properties
static String SSL_ATTR_ALGORITHM
           
static String SSL_ATTR_ALLOW_UNSAFE_RENEG
           
static String SSL_ATTR_CIPHERS
           
static String SSL_ATTR_CLIENT_AUTH
           
static String SSL_ATTR_CRL_FILE
           
static String SSL_ATTR_KEY_ALIAS
           
static String SSL_ATTR_KEY_PASS
           
static String SSL_ATTR_KEYSTORE_FILE
           
static String SSL_ATTR_KEYSTORE_PASS
           
static String SSL_ATTR_KEYSTORE_PROVIDER
           
static String SSL_ATTR_KEYSTORE_TYPE
           
static String SSL_ATTR_SESSION_CACHE_SIZE
           
static String SSL_ATTR_SESSION_TIMEOUT
           
static String SSL_ATTR_SSL_PROTOCOL
           
static String SSL_ATTR_TRUST_MAX_CERT_LENGTH
           
static String SSL_ATTR_TRUSTSTORE_ALGORITHM
           
static String SSL_ATTR_TRUSTSTORE_FILE
           
static String SSL_ATTR_TRUSTSTORE_PASS
           
static String SSL_ATTR_TRUSTSTORE_PROVIDER
           
static String SSL_ATTR_TRUSTSTORE_TYPE
           
protected  int threadPriority
          Priority of the worker threads.
 
Constructor Summary
AbstractEndpoint()
           
 
Method Summary
 String adjustRelativePath(String path, String relativeTo)
           
 void createExecutor()
           
abstract  void destroy()
           
 InetAddress getAddress()
           
 String getAlgorithm()
           
 String getAllowUnsafeLegacyRenegotiation()
           
 int getBacklog()
           
 String getCiphers()
           
 String[] getCiphersArray()
           
 String getClientAuth()
           
 String getCrlFile()
           
 int getCurrentThreadCount()
          Return the amount of threads that are managed by the pool.
 int getCurrentThreadsBusy()
          Return the amount of threads that are in use
 boolean getDaemon()
           
protected abstract  boolean getDeferAccept()
           
 Executor getExecutor()
           
 int getKeepAliveTimeout()
           
 String getKeyAlias()
           
 String getKeyPass()
           
 String getKeystoreFile()
           
 String getKeystorePass()
           
 String getKeystoreProvider()
           
 String getKeystoreType()
           
protected abstract  Log getLog()
           
 int getMaxConnections()
           
 int getMaxKeepAliveRequests()
           
 int getMaxThreads()
           
 int getMinSpareThreads()
           
 String getName()
           
 int getPort()
           
 String getSessionCacheSize()
           
 String getSessionTimeout()
           
 SocketProperties getSocketProperties()
           
 int getSoLinger()
          Socket linger.
 int getSoTimeout()
          Socket timeout.
 String[] getSslEnabledProtocolsArray()
           
 String getSslProtocol()
           
 boolean getTcpNoDelay()
          Socket TCP no delay.
 int getThreadPriority()
           
 String getTrustMaxCertLength()
           
 String getTruststoreAlgorithm()
           
 String getTruststoreFile()
           
 String getTruststorePass()
           
 String getTruststoreProvider()
           
 String getTruststoreType()
           
abstract  boolean getUseSendfile()
           
abstract  void init()
           
 boolean isPaused()
           
 boolean isRunning()
           
 boolean isSSLEnabled()
           
 void pause()
          Pause the endpoint, which will stop it accepting new connections.
 void resume()
          Resume the endpoint, which will make it start accepting new connections again.
 void setAddress(InetAddress address)
           
 void setAlgorithm(String s)
           
 void setAllowUnsafeLegacyRenegotiation(String s)
           
 void setBacklog(int backlog)
           
 void setCiphers(String s)
           
 void setClientAuth(String s)
           
 void setCrlFile(String crlFile)
           
 void setDaemon(boolean b)
           
 void setExecutor(Executor executor)
           
 void setKeepAliveTimeout(int keepAliveTimeout)
           
 void setKeyAlias(String s)
           
 void setKeyPass(String s)
           
 void setKeystoreFile(String s)
           
 void setKeystorePass(String s)
           
 void setKeystoreProvider(String s)
           
 void setKeystoreType(String s)
           
 void setMaxConnections(int maxCon)
           
 void setMaxKeepAliveRequests(int maxKeepAliveRequests)
           
 void setMaxThreads(int maxThreads)
           
 void setMinSpareThreads(int minSpareThreads)
           
 void setName(String name)
           
 void setPort(int port)
           
 boolean setProperty(String name, String value)
          Generic properties, introspected
 void setSessionCacheSize(String s)
           
 void setSessionTimeout(String s)
           
 void setSoLinger(int soLinger)
           
 void setSoTimeout(int soTimeout)
           
 void setSSLEnabled(boolean SSLEnabled)
           
 void setSslEnabledProtocols(String s)
           
 void setSslProtocol(String s)
           
 void setTcpNoDelay(boolean tcpNoDelay)
           
 void setThreadPriority(int threadPriority)
           
 void setTrustMaxCertLength(String trustMaxCertLength)
           
 void setTruststoreAlgorithm(String truststoreAlgorithm)
           
 void setTruststoreFile(String s)
           
 void setTruststorePass(String truststorePass)
           
 void setTruststoreProvider(String truststoreProvider)
           
 void setTruststoreType(String truststoreType)
           
 void shutdownExecutor()
           
abstract  void start()
           
abstract  void stop()
           
protected  void unlockAccept()
          Unlock the server socket accept using a bogus connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sm

protected static final StringManager sm

CIPHER_SUITE_KEY

public static final String CIPHER_SUITE_KEY
The Request attribute key for the cipher suite.

See Also:
Constant Field Values

KEY_SIZE_KEY

public static final String KEY_SIZE_KEY
The Request attribute key for the key size.

See Also:
Constant Field Values

CERTIFICATE_KEY

public static final String CERTIFICATE_KEY
The Request attribute key for the client certificate chain.

See Also:
Constant Field Values

SESSION_ID_KEY

public static final String SESSION_ID_KEY
The Request attribute key for the session id. This one is a Tomcat extension to the Servlet spec.

See Also:
Constant Field Values

SESSION_MGR

public static final String SESSION_MGR
The request attribute key for the session manager. This one is a Tomcat extension to the Servlet spec.

See Also:
Constant Field Values

SSL_ATTR_ALGORITHM

public static final String SSL_ATTR_ALGORITHM
See Also:
Constant Field Values

SSL_ATTR_CLIENT_AUTH

public static final String SSL_ATTR_CLIENT_AUTH
See Also:
Constant Field Values

SSL_ATTR_KEYSTORE_FILE

public static final String SSL_ATTR_KEYSTORE_FILE
See Also:
Constant Field Values

SSL_ATTR_KEYSTORE_PASS

public static final String SSL_ATTR_KEYSTORE_PASS
See Also:
Constant Field Values

SSL_ATTR_KEYSTORE_TYPE

public static final String SSL_ATTR_KEYSTORE_TYPE
See Also:
Constant Field Values

SSL_ATTR_KEYSTORE_PROVIDER

public static final String SSL_ATTR_KEYSTORE_PROVIDER
See Also:
Constant Field Values

SSL_ATTR_SSL_PROTOCOL

public static final String SSL_ATTR_SSL_PROTOCOL
See Also:
Constant Field Values

SSL_ATTR_CIPHERS

public static final String SSL_ATTR_CIPHERS
See Also:
Constant Field Values

SSL_ATTR_KEY_ALIAS

public static final String SSL_ATTR_KEY_ALIAS
See Also:
Constant Field Values

SSL_ATTR_KEY_PASS

public static final String SSL_ATTR_KEY_PASS
See Also:
Constant Field Values

SSL_ATTR_TRUSTSTORE_FILE

public static final String SSL_ATTR_TRUSTSTORE_FILE
See Also:
Constant Field Values

SSL_ATTR_TRUSTSTORE_PASS

public static final String SSL_ATTR_TRUSTSTORE_PASS
See Also:
Constant Field Values

SSL_ATTR_TRUSTSTORE_TYPE

public static final String SSL_ATTR_TRUSTSTORE_TYPE
See Also:
Constant Field Values

SSL_ATTR_TRUSTSTORE_PROVIDER

public static final String SSL_ATTR_TRUSTSTORE_PROVIDER
See Also:
Constant Field Values

SSL_ATTR_TRUSTSTORE_ALGORITHM

public static final String SSL_ATTR_TRUSTSTORE_ALGORITHM
See Also:
Constant Field Values

SSL_ATTR_CRL_FILE

public static final String SSL_ATTR_CRL_FILE
See Also:
Constant Field Values

SSL_ATTR_TRUST_MAX_CERT_LENGTH

public static final String SSL_ATTR_TRUST_MAX_CERT_LENGTH
See Also:
Constant Field Values

SSL_ATTR_SESSION_CACHE_SIZE

public static final String SSL_ATTR_SESSION_CACHE_SIZE
See Also:
Constant Field Values

SSL_ATTR_SESSION_TIMEOUT

public static final String SSL_ATTR_SESSION_TIMEOUT
See Also:
Constant Field Values

SSL_ATTR_ALLOW_UNSAFE_RENEG

public static final String SSL_ATTR_ALLOW_UNSAFE_RENEG
See Also:
Constant Field Values

running

protected volatile boolean running
Running state of the endpoint.


paused

protected volatile boolean paused
Will be set to true whenever the endpoint is paused.


initialized

protected boolean initialized
Track the initialization state of the endpoint.


internalExecutor

protected volatile boolean internalExecutor
Are we using an internal executor


socketProperties

protected SocketProperties socketProperties
Socket properties


threadPriority

protected int threadPriority
Priority of the worker threads.

Constructor Detail

AbstractEndpoint

public AbstractEndpoint()
Method Detail

getSocketProperties

public SocketProperties getSocketProperties()

setMaxConnections

public void setMaxConnections(int maxCon)

getMaxConnections

public int getMaxConnections()

setExecutor

public void setExecutor(Executor executor)

getExecutor

public Executor getExecutor()

getPort

public int getPort()

setPort

public void setPort(int port)

getAddress

public InetAddress getAddress()

setAddress

public void setAddress(InetAddress address)

setBacklog

public void setBacklog(int backlog)

getBacklog

public int getBacklog()

setKeepAliveTimeout

public void setKeepAliveTimeout(int keepAliveTimeout)

getKeepAliveTimeout

public int getKeepAliveTimeout()

getTcpNoDelay

public boolean getTcpNoDelay()
Socket TCP no delay.


setTcpNoDelay

public void setTcpNoDelay(boolean tcpNoDelay)

getSoLinger

public int getSoLinger()
Socket linger.


setSoLinger

public void setSoLinger(int soLinger)

getSoTimeout

public int getSoTimeout()
Socket timeout.


setSoTimeout

public void setSoTimeout(int soTimeout)

isSSLEnabled

public boolean isSSLEnabled()

setSSLEnabled

public void setSSLEnabled(boolean SSLEnabled)

getMinSpareThreads

public int getMinSpareThreads()

setMinSpareThreads

public void setMinSpareThreads(int minSpareThreads)

setMaxThreads

public void setMaxThreads(int maxThreads)

getMaxThreads

public int getMaxThreads()

getMaxKeepAliveRequests

public int getMaxKeepAliveRequests()

setMaxKeepAliveRequests

public void setMaxKeepAliveRequests(int maxKeepAliveRequests)

setName

public void setName(String name)

getName

public String getName()

setDaemon

public void setDaemon(boolean b)

getDaemon

public boolean getDaemon()

setThreadPriority

public void setThreadPriority(int threadPriority)

getThreadPriority

public int getThreadPriority()

getDeferAccept

protected abstract boolean getDeferAccept()

setProperty

public boolean setProperty(String name,
                           String value)
Generic properties, introspected


getCurrentThreadCount

public int getCurrentThreadCount()
Return the amount of threads that are managed by the pool.

Returns:
the amount of threads that are managed by the pool

getCurrentThreadsBusy

public int getCurrentThreadsBusy()
Return the amount of threads that are in use

Returns:
the amount of threads that are in use

isRunning

public boolean isRunning()

isPaused

public boolean isPaused()

createExecutor

public void createExecutor()

shutdownExecutor

public void shutdownExecutor()

unlockAccept

protected void unlockAccept()
Unlock the server socket accept using a bogus connection.


init

public abstract void init()
                   throws Exception
Throws:
Exception

start

public abstract void start()
                    throws Exception
Throws:
Exception

pause

public void pause()
Pause the endpoint, which will stop it accepting new connections.


resume

public void resume()
Resume the endpoint, which will make it start accepting new connections again.


stop

public abstract void stop()
                   throws Exception
Throws:
Exception

destroy

public abstract void destroy()
                      throws Exception
Throws:
Exception

adjustRelativePath

public String adjustRelativePath(String path,
                                 String relativeTo)

getLog

protected abstract Log getLog()

getUseSendfile

public abstract boolean getUseSendfile()

getAlgorithm

public String getAlgorithm()

setAlgorithm

public void setAlgorithm(String s)

getClientAuth

public String getClientAuth()

setClientAuth

public void setClientAuth(String s)

getKeystoreFile

public String getKeystoreFile()

setKeystoreFile

public void setKeystoreFile(String s)

getKeystorePass

public String getKeystorePass()

setKeystorePass

public void setKeystorePass(String s)

getKeystoreType

public String getKeystoreType()

setKeystoreType

public void setKeystoreType(String s)

getKeystoreProvider

public String getKeystoreProvider()

setKeystoreProvider

public void setKeystoreProvider(String s)

getSslProtocol

public String getSslProtocol()

setSslProtocol

public void setSslProtocol(String s)

getCiphersArray

public String[] getCiphersArray()

getCiphers

public String getCiphers()

setCiphers

public void setCiphers(String s)

getKeyAlias

public String getKeyAlias()

setKeyAlias

public void setKeyAlias(String s)

getKeyPass

public String getKeyPass()

setKeyPass

public void setKeyPass(String s)

getTruststoreFile

public String getTruststoreFile()

setTruststoreFile

public void setTruststoreFile(String s)

getTruststorePass

public String getTruststorePass()

setTruststorePass

public void setTruststorePass(String truststorePass)

getTruststoreType

public String getTruststoreType()

setTruststoreType

public void setTruststoreType(String truststoreType)

getTruststoreProvider

public String getTruststoreProvider()

setTruststoreProvider

public void setTruststoreProvider(String truststoreProvider)

getTruststoreAlgorithm

public String getTruststoreAlgorithm()

setTruststoreAlgorithm

public void setTruststoreAlgorithm(String truststoreAlgorithm)

getCrlFile

public String getCrlFile()

setCrlFile

public void setCrlFile(String crlFile)

getTrustMaxCertLength

public String getTrustMaxCertLength()

setTrustMaxCertLength

public void setTrustMaxCertLength(String trustMaxCertLength)

getSessionCacheSize

public String getSessionCacheSize()

setSessionCacheSize

public void setSessionCacheSize(String s)

getSessionTimeout

public String getSessionTimeout()

setSessionTimeout

public void setSessionTimeout(String s)

getAllowUnsafeLegacyRenegotiation

public String getAllowUnsafeLegacyRenegotiation()

setAllowUnsafeLegacyRenegotiation

public void setAllowUnsafeLegacyRenegotiation(String s)

getSslEnabledProtocolsArray

public String[] getSslEnabledProtocolsArray()

setSslEnabledProtocols

public void setSslEnabledProtocols(String s)

Apache Tomcat 7.0.4

Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.