Class PECoyoteConnector
- java.lang.Object
-
- org.apache.catalina.connector.Connector
-
- com.sun.enterprise.web.connector.coyote.PECoyoteConnector
-
- Direct Known Subclasses:
WebConnector
public class PECoyoteConnector extends Connector
-
-
Field Summary
Fields Modifier and Type Field Description protected static Logger
_logger
protected static ResourceBundle
_rb
protected GrizzlyConfig
grizzlyMonitor
The monitoring classes used to gather stats.protected MapperListener
mapperListener
Mapper listener.protected int
maxAcceptWorkerThreads
The number of acceptor threads.protected int
maxReadWorkerThreads
The number of reader threads.protected int
minAcceptQueueLength
The size of the accept queue.protected int
minProcessorQueueLength
The size of the processor queue.protected int
minReadQueueLength
The size of the read queueprotected int
processorWorkerThreadsTimeout
The request timeout value used by the processor threads.protected boolean
recycleObjects
Are we recycling objectsprotected int
ssBackLog
Server socket backlog.protected boolean
useDirectByteBuffer
Use direct or non direct byte buffer.-
Fields inherited from class org.apache.catalina.connector.Connector
authPassthroughEnabled, container, domain, initialized, lifecycle, mapper, maxSavePostSize, minProcessors, oname, proxyHandler
-
Fields inherited from interface org.apache.catalina.Lifecycle
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT
-
-
Constructor Summary
Constructors Constructor Description PECoyoteConnector(WebContainer webContainer)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configHttpProperties(Http http, Transport transport, Ssl ssl)
void
configure(NetworkListener listener, boolean isSecure, HttpService httpService)
void
configureFileCache(FileCache fileCache)
Configure the Grizzly FileCache mechanismboolean
configureHttpListenerProperty(String propName, String propValue)
Configure http-listener property.void
configureJKProperties(NetworkListener listener)
void
configureThreadPool(ThreadPool pool)
Configures this connector from the given thread-pool configuration bean.Request
createRequest()
Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible ContractProvider.Response
createResponse()
Creates and returns Response object.String
getCrlFile()
Gets the location of the CRL fileint
getKeepAliveThreadCount()
Gets the number of keep-alive threads.int
getKeepAliveTimeoutInSeconds()
Gets the number of seconds before a keep-alive connection that has been idle times out and is closed.String
getKeystoreType()
Gets the keystore type of this connector.boolean
getLargeFileCacheEnabled()
Is the large file cache support enabled.MapperListener
getMapperListener()
Gets the MapperListener of this connector.int
getMaxAcceptWorkerThreads()
Return theread-thread
used by thisSelector
int
getMaxCacheEntries()
Return the maximum entries this cache can contains.long
getMaxEntrySize()
Get the maximum size aFileCacheEntry
can have.long
getMaxLargeCacheSize()
Get the maximum cache sizeint
getMaxReadWorkerThreads()
Return theread-thread
used by thisSelector
long
getMaxSmallCacheSize()
Get the maximum cache sizeint
getMinAcceptQueueLength()
Return theacceptor-queue-length
value on thisSelector
long
getMinEntrySize()
Get the maximum size aFileCacheEntry
can have.int
getMinProcessorQueueLength()
Return theprocessor-queue-length
value on thisSelector
int
getMinReadQueueLength()
Return thereader-queue-length
value on thisSelector
int
getProcessorWorkerThreadsTimeout()
int
getQueueSizeInBytes()
Return the maximum pending connection.boolean
getRecycleObjects()
Return therecycle-tasks
used by thisSelector
int
getSecondsMaxAge()
int
getSelectorReadThreadsCount()
int
getSocketServerBacklog()
Return the maximum pending connection.String
getTrustAlgorithm()
Gets the trust management algorithmString
getTrustMaxCertLength()
Gets the maximum number of non-self-issued intermediate certificates that may exist in a certification pathString
getTruststore()
Gets the truststore location of this connector.String
getTruststoreType()
Gets the truststore type of this connector.boolean
getUseDirectByteBuffer()
Return theuse-nio-non-blocking
used by thisSelector
String
getWebAppRootPath()
Return the folder's root where application are deployed.void
initialize()
Initialize this connector.boolean
isFileCacheEnabled()
Is the fileCache enabled.void
requestEndEvent(jakarta.servlet.http.HttpServletRequest request, Host host, Context context, int statusCode)
Fires probe event related to the fact that the given request is about to exit from the web container.void
requestStartEvent(jakarta.servlet.http.HttpServletRequest request, Host host, Context context)
Fires probe event related to the fact that the given request has been entered the web container.void
setCrlFile(String crlFile)
Sets the location of the CRL file.void
setFileCacheEnabled(boolean fileCacheEnabled)
Is the file caching mechanism enabled.void
setKeepAliveThreadCount(int number)
Sets the number of keep-alive threadsvoid
setKeepAliveTimeoutInSeconds(int timeout)
Sets the number of seconds before a keep-alive connection that has been idle times out and is closed.void
setKeystoreType(String type)
Sets the keystore type of this connector.void
setLargeFileCacheEnabled(boolean isLargeEnabled)
Is the large file cache support enabled.void
setMaxAcceptWorkerThreads(int maxAcceptWorkerThreads)
Set thereader-thread
from domian.xml.void
setMaxCacheEntries(int mEntries)
Set the maximum entries this cache can contains.void
setMaxEntrySize(long mEntrySize)
Set the maximum size aFileCacheEntry
can have.void
setMaxLargeCacheSize(long mCacheSize)
Set the maximum cache sizevoid
setMaxReadWorkerThreads(int maxReadWorkerThreads)
Set thereader-thread
from domian.xml.void
setMaxSmallCacheSize(long mCacheSize)
Set the maximum cache sizevoid
setMinAcceptQueueLength(int minAcceptQueueLength)
Set theacceptor-queue-length
value on thisSelector
void
setMinEntrySize(long mSize)
Set the maximum size aFileCacheEntry
can have.void
setMinProcessorQueueLength(int minProcessorQueueLength)
Set theprocessor-queue-length
value on thisSelector
void
setMinReadQueueLength(int minReadQueueLength)
Set thereader-queue-length
value on thisSelector
void
setProcessorWorkerThreadsTimeout(int timeout)
void
setProxyHandler(String className)
void
setQueueSizeInBytes(int queueSizeInBytes)
Set the maximum pending connection thisConnector
can handle.void
setRecycleObjects(boolean recycleObjects)
Set therecycle-tasks
used by thisSelector
void
setSecondsMaxAge(int sMaxAges)
The timeout in seconds before remove aFileCacheEntry
from thefileCache
void
setSelectorReadThreadsCount(int selectorReadThreadsCount)
void
setSocketServerBacklog(int ssBackLog)
Set theSocketServer
backlog.void
setTrustAlgorithm(String trustAlgorithm)
Sets the trust management algorithmvoid
setTrustMaxCertLength(String trustMaxCertLength)
Sets the maximum number of non-self-issued intermediate certificates that may exist in a certification pathvoid
setTruststore(String truststore)
Sets the truststore location of this connector.void
setTruststoreType(String type)
Sets the truststore type of this connector.void
setUseDirectByteBuffer(boolean useDirectByteBuffer)
Set theuse-nio-non-blocking
by thisSelector
void
setWebAppRootPath(String rootFolder)
Set the documenr root foldervoid
start()
Begin processing requests via this Connector.void
stop()
Terminate processing requests via this Connector.-
Methods inherited from class org.apache.catalina.connector.Connector
addLifecycleListener, createObjectName, destroy, findLifecycleListeners, getAcceptCount, getAddress, getAllowTrace, getAuthPassthroughEnabled, getBlocking, getBufferSize, getCertificates, getCiphers, getClientAuth, getCompression, getConnectionLinger, getConnectionTimeout, getConnectionUploadTimeout, getContainer, getController, getDebug, getDefaultHost, getDisableUploadTimeout, getDomain, getEnableLookups, getFactory, getHandler, getInfo, getInstanceName, getJvmRoute, getKeepAlive, getKeyAlias, getKeystoreFile, getKeystorePass, getMapper, getMaxHttpHeaderSize, getMaxKeepAliveRequests, getMaxPostSize, getMaxProcessors, getMaxSavePostSize, getMinProcessors, getName, getObjectName, getPort, getProperty, getProtocol, getProtocolHandler, getProtocolHandlerClassName, getProxyHandler, getProxyName, getProxyPort, getRedirectPort, getScheme, getSecure, getSelectorThreadImpl, getServerSocketTimeout, getService, getSslProtocol, getSslProtocols, getTcpNoDelay, getTomcatAuthentication, getURIEncoding, init, isAvailable, isEnabled, isServerHeader, isXframeOptions, isXpoweredBy, removeLifecycleListener, removeProperty, setAcceptCount, setAddress, setAllowTrace, setAuthPassthroughEnabled, setBlocking, setBufferSize, setCiphers, setClientAuth, setCompression, setConnectionLinger, setConnectionTimeout, setConnectionUploadTimeout, setContainer, setController, setDebug, setDefaultHost, setDisableUploadTimeout, setDomain, setEnabled, setEnableLookups, setFactory, setHandler, setInstanceName, setJvmRoute, setKeepAlive, setKeyAlias, setKeystoreFile, setKeystorePass, setMapper, setMaxHttpHeaderSize, setMaxKeepAliveRequests, setMaxPostSize, setMaxProcessors, setMaxSavePostSize, setMinProcessors, setName, setPort, setProperty, setProtocol, setProtocolHandler, setProtocolHandlerClassName, setProxyHandler, setProxyName, setProxyPort, setRedirectPort, setScheme, setSecure, setSelectorThreadImpl, setServerHeader, setServerSocketTimeout, setService, setSslProtocol, setSslProtocols, setTcpNoDelay, setTomcatAuthentication, setURIEncoding, setXframeOptions, setXpoweredBy
-
-
-
-
Field Detail
-
_logger
protected static final Logger _logger
-
_rb
protected static final ResourceBundle _rb
-
recycleObjects
protected boolean recycleObjects
Are we recycling objects
-
maxAcceptWorkerThreads
protected int maxAcceptWorkerThreads
The number of acceptor threads.
-
maxReadWorkerThreads
protected int maxReadWorkerThreads
The number of reader threads.
-
processorWorkerThreadsTimeout
protected int processorWorkerThreadsTimeout
The request timeout value used by the processor threads.
-
minAcceptQueueLength
protected int minAcceptQueueLength
The size of the accept queue.
-
minReadQueueLength
protected int minReadQueueLength
The size of the read queue
-
minProcessorQueueLength
protected int minProcessorQueueLength
The size of the processor queue.
-
useDirectByteBuffer
protected boolean useDirectByteBuffer
Use direct or non direct byte buffer.
-
ssBackLog
protected int ssBackLog
Server socket backlog.
-
grizzlyMonitor
protected GrizzlyConfig grizzlyMonitor
The monitoring classes used to gather stats.
-
mapperListener
protected MapperListener mapperListener
Mapper listener.
-
-
Constructor Detail
-
PECoyoteConnector
public PECoyoteConnector(WebContainer webContainer)
Constructor
-
-
Method Detail
-
createRequest
public Request createRequest()
Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible ContractProvider.- Specified by:
createRequest
in interfaceConnector
- Overrides:
createRequest
in classConnector
-
createResponse
public Response createResponse()
Creates and returns Response object.- Specified by:
createResponse
in interfaceConnector
- Overrides:
createResponse
in classConnector
- Returns:
- Response object
-
getKeepAliveTimeoutInSeconds
public int getKeepAliveTimeoutInSeconds()
Gets the number of seconds before a keep-alive connection that has been idle times out and is closed.- Returns:
- Keep-alive timeout in number of seconds
-
setKeepAliveTimeoutInSeconds
public void setKeepAliveTimeoutInSeconds(int timeout)
Sets the number of seconds before a keep-alive connection that has been idle times out and is closed.- Parameters:
timeout
- Keep-alive timeout in number of seconds
-
getKeepAliveThreadCount
public int getKeepAliveThreadCount()
Gets the number of keep-alive threads.- Returns:
- Number of keep-alive threads
-
setKeepAliveThreadCount
public void setKeepAliveThreadCount(int number)
Sets the number of keep-alive threads- Parameters:
number
- Number of keep-alive threads
-
setQueueSizeInBytes
public void setQueueSizeInBytes(int queueSizeInBytes)
Set the maximum pending connection thisConnector
can handle.
-
getQueueSizeInBytes
public int getQueueSizeInBytes()
Return the maximum pending connection.
-
setSocketServerBacklog
public void setSocketServerBacklog(int ssBackLog)
Set theSocketServer
backlog.
-
getSocketServerBacklog
public int getSocketServerBacklog()
Return the maximum pending connection.
-
setRecycleObjects
public void setRecycleObjects(boolean recycleObjects)
Set therecycle-tasks
used by thisSelector
-
getRecycleObjects
public boolean getRecycleObjects()
Return therecycle-tasks
used by thisSelector
-
setMaxReadWorkerThreads
public void setMaxReadWorkerThreads(int maxReadWorkerThreads)
Set thereader-thread
from domian.xml.
-
getMaxReadWorkerThreads
public int getMaxReadWorkerThreads()
Return theread-thread
used by thisSelector
-
setMaxAcceptWorkerThreads
public void setMaxAcceptWorkerThreads(int maxAcceptWorkerThreads)
Set thereader-thread
from domian.xml.
-
getMaxAcceptWorkerThreads
public int getMaxAcceptWorkerThreads()
Return theread-thread
used by thisSelector
-
setMinAcceptQueueLength
public void setMinAcceptQueueLength(int minAcceptQueueLength)
Set theacceptor-queue-length
value on thisSelector
-
getMinAcceptQueueLength
public int getMinAcceptQueueLength()
Return theacceptor-queue-length
value on thisSelector
-
setMinReadQueueLength
public void setMinReadQueueLength(int minReadQueueLength)
Set thereader-queue-length
value on thisSelector
-
getMinReadQueueLength
public int getMinReadQueueLength()
Return thereader-queue-length
value on thisSelector
-
setMinProcessorQueueLength
public void setMinProcessorQueueLength(int minProcessorQueueLength)
Set theprocessor-queue-length
value on thisSelector
-
getMinProcessorQueueLength
public int getMinProcessorQueueLength()
Return theprocessor-queue-length
value on thisSelector
-
setUseDirectByteBuffer
public void setUseDirectByteBuffer(boolean useDirectByteBuffer)
Set theuse-nio-non-blocking
by thisSelector
-
getUseDirectByteBuffer
public boolean getUseDirectByteBuffer()
Return theuse-nio-non-blocking
used by thisSelector
-
setProcessorWorkerThreadsTimeout
public void setProcessorWorkerThreadsTimeout(int timeout)
-
getProcessorWorkerThreadsTimeout
public int getProcessorWorkerThreadsTimeout()
-
setSelectorReadThreadsCount
public void setSelectorReadThreadsCount(int selectorReadThreadsCount)
-
getSelectorReadThreadsCount
public int getSelectorReadThreadsCount()
-
start
public void start() throws LifecycleException
Description copied from class:Connector
Begin processing requests via this Connector.- Specified by:
start
in interfaceLifecycle
- Overrides:
start
in classConnector
- Throws:
LifecycleException
- if a fatal startup error occurs
-
stop
public void stop() throws LifecycleException
Description copied from class:Connector
Terminate processing requests via this Connector.- Specified by:
stop
in interfaceLifecycle
- Overrides:
stop
in classConnector
- Throws:
LifecycleException
- if a fatal shutdown error occurs
-
setSecondsMaxAge
public void setSecondsMaxAge(int sMaxAges)
The timeout in seconds before remove aFileCacheEntry
from thefileCache
-
getSecondsMaxAge
public int getSecondsMaxAge()
-
setMaxCacheEntries
public void setMaxCacheEntries(int mEntries)
Set the maximum entries this cache can contains.
-
getMaxCacheEntries
public int getMaxCacheEntries()
Return the maximum entries this cache can contains.
-
setMinEntrySize
public void setMinEntrySize(long mSize)
Set the maximum size aFileCacheEntry
can have.
-
getMinEntrySize
public long getMinEntrySize()
Get the maximum size aFileCacheEntry
can have.
-
setMaxEntrySize
public void setMaxEntrySize(long mEntrySize)
Set the maximum size aFileCacheEntry
can have.
-
getMaxEntrySize
public long getMaxEntrySize()
Get the maximum size aFileCacheEntry
can have.
-
setMaxLargeCacheSize
public void setMaxLargeCacheSize(long mCacheSize)
Set the maximum cache size
-
getMaxLargeCacheSize
public long getMaxLargeCacheSize()
Get the maximum cache size
-
setMaxSmallCacheSize
public void setMaxSmallCacheSize(long mCacheSize)
Set the maximum cache size
-
getMaxSmallCacheSize
public long getMaxSmallCacheSize()
Get the maximum cache size
-
isFileCacheEnabled
public boolean isFileCacheEnabled()
Is the fileCache enabled.
-
setFileCacheEnabled
public void setFileCacheEnabled(boolean fileCacheEnabled)
Is the file caching mechanism enabled.
-
setLargeFileCacheEnabled
public void setLargeFileCacheEnabled(boolean isLargeEnabled)
Is the large file cache support enabled.
-
getLargeFileCacheEnabled
public boolean getLargeFileCacheEnabled()
Is the large file cache support enabled.
-
setWebAppRootPath
public void setWebAppRootPath(String rootFolder)
Set the documenr root folder
-
getWebAppRootPath
public String getWebAppRootPath()
Return the folder's root where application are deployed.
-
initialize
public void initialize() throws LifecycleException
Initialize this connector.- Specified by:
initialize
in interfaceConnector
- Overrides:
initialize
in classConnector
- Throws:
LifecycleException
- If this server was already initialized.
-
setTruststore
public void setTruststore(String truststore)
Sets the truststore location of this connector.- Parameters:
truststore
- The truststore location
-
getTruststore
public String getTruststore()
Gets the truststore location of this connector.- Returns:
- The truststore location
-
setTruststoreType
public void setTruststoreType(String type)
Sets the truststore type of this connector.- Parameters:
type
- The truststore type
-
getTruststoreType
public String getTruststoreType()
Gets the truststore type of this connector.- Returns:
- The truststore type
-
setKeystoreType
public void setKeystoreType(String type)
Sets the keystore type of this connector.- Parameters:
type
- The keystore type
-
getKeystoreType
public String getKeystoreType()
Gets the keystore type of this connector.- Returns:
- The keystore type
-
getCrlFile
public String getCrlFile()
Gets the location of the CRL file- Returns:
- The location of the CRL file
-
setCrlFile
public void setCrlFile(String crlFile)
Sets the location of the CRL file.- Parameters:
crlFile
- The location of the CRL file
-
getTrustAlgorithm
public String getTrustAlgorithm()
Gets the trust management algorithm- Returns:
- The trust management algorithm
-
setTrustAlgorithm
public void setTrustAlgorithm(String trustAlgorithm)
Sets the trust management algorithm- Parameters:
trustAlgorithm
- The trust management algorithm
-
getTrustMaxCertLength
public String getTrustMaxCertLength()
Gets the maximum number of non-self-issued intermediate certificates that may exist in a certification path- Returns:
- The maximum number of non-self-issued intermediate certificates that may exist in a certification path
-
setTrustMaxCertLength
public void setTrustMaxCertLength(String trustMaxCertLength)
Sets the maximum number of non-self-issued intermediate certificates that may exist in a certification path- Parameters:
trustMaxCertLength
- The maximum number of non-self-issued intermediate certificates that may exist in a certification path
-
getMapperListener
public MapperListener getMapperListener()
Gets the MapperListener of this connector.- Returns:
- The MapperListener of this connector
-
configure
public void configure(NetworkListener listener, boolean isSecure, HttpService httpService)
-
configureJKProperties
public void configureJKProperties(NetworkListener listener)
-
configureFileCache
public void configureFileCache(FileCache fileCache)
Configure the Grizzly FileCache mechanism- Parameters:
fileCache
-
-
configureThreadPool
public void configureThreadPool(ThreadPool pool)
Configures this connector from the given thread-pool configuration bean.- Parameters:
pool
- the thread-pool configuration bean
-
configureHttpListenerProperty
public boolean configureHttpListenerProperty(String propName, String propValue) throws NumberFormatException
Configure http-listener property. return true if the property exists and has been set.- Throws:
NumberFormatException
-
setProxyHandler
public void setProxyHandler(String className)
-
requestStartEvent
public void requestStartEvent(jakarta.servlet.http.HttpServletRequest request, Host host, Context context)
Fires probe event related to the fact that the given request has been entered the web container.- Overrides:
requestStartEvent
in classConnector
- Parameters:
request
- the request objecthost
- the virtual server to which the request was mappedcontext
- the Context to which the request was mapped
-
requestEndEvent
public void requestEndEvent(jakarta.servlet.http.HttpServletRequest request, Host host, Context context, int statusCode)
Fires probe event related to the fact that the given request is about to exit from the web container.- Overrides:
requestEndEvent
in classConnector
- Parameters:
request
- the request objecthost
- the virtual server to which the request was mappedcontext
- the Context to which the request was mappedstatusCode
- the response status code
-
-