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_loggerprotected static ResourceBundle_rbprotected GrizzlyConfiggrizzlyMonitorThe monitoring classes used to gather stats.protected MapperListenermapperListenerMapper listener.protected intmaxAcceptWorkerThreadsThe number of acceptor threads.protected intmaxReadWorkerThreadsThe number of reader threads.protected intminAcceptQueueLengthThe size of the accept queue.protected intminProcessorQueueLengthThe size of the processor queue.protected intminReadQueueLengthThe size of the read queueprotected intprocessorWorkerThreadsTimeoutThe request timeout value used by the processor threads.protected booleanrecycleObjectsAre we recycling objectsprotected intssBackLogServer socket backlog.protected booleanuseDirectByteBufferUse 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 voidconfigHttpProperties(Http http, Transport transport, Ssl ssl)voidconfigure(NetworkListener listener, boolean isSecure, HttpService httpService)voidconfigureFileCache(FileCache fileCache)Configure the Grizzly FileCache mechanismbooleanconfigureHttpListenerProperty(String propName, String propValue)Configure http-listener property.voidconfigureJKProperties(NetworkListener listener)voidconfigureThreadPool(ThreadPool pool)Configures this connector from the given thread-pool configuration bean.RequestcreateRequest()Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible ContractProvider.ResponsecreateResponse()Creates and returns Response object.StringgetCrlFile()Gets the location of the CRL fileintgetKeepAliveThreadCount()Gets the number of keep-alive threads.intgetKeepAliveTimeoutInSeconds()Gets the number of seconds before a keep-alive connection that has been idle times out and is closed.StringgetKeystoreType()Gets the keystore type of this connector.booleangetLargeFileCacheEnabled()Is the large file cache support enabled.MapperListenergetMapperListener()Gets the MapperListener of this connector.intgetMaxAcceptWorkerThreads()Return theread-threadused by thisSelectorintgetMaxCacheEntries()Return the maximum entries this cache can contains.longgetMaxEntrySize()Get the maximum size aFileCacheEntrycan have.longgetMaxLargeCacheSize()Get the maximum cache sizeintgetMaxReadWorkerThreads()Return theread-threadused by thisSelectorlonggetMaxSmallCacheSize()Get the maximum cache sizeintgetMinAcceptQueueLength()Return theacceptor-queue-lengthvalue on thisSelectorlonggetMinEntrySize()Get the maximum size aFileCacheEntrycan have.intgetMinProcessorQueueLength()Return theprocessor-queue-lengthvalue on thisSelectorintgetMinReadQueueLength()Return thereader-queue-lengthvalue on thisSelectorintgetProcessorWorkerThreadsTimeout()intgetQueueSizeInBytes()Return the maximum pending connection.booleangetRecycleObjects()Return therecycle-tasksused by thisSelectorintgetSecondsMaxAge()intgetSelectorReadThreadsCount()intgetSocketServerBacklog()Return the maximum pending connection.StringgetTrustAlgorithm()Gets the trust management algorithmStringgetTrustMaxCertLength()Gets the maximum number of non-self-issued intermediate certificates that may exist in a certification pathStringgetTruststore()Gets the truststore location of this connector.StringgetTruststoreType()Gets the truststore type of this connector.booleangetUseDirectByteBuffer()Return theuse-nio-non-blockingused by thisSelectorStringgetWebAppRootPath()Return the folder's root where application are deployed.voidinitialize()Initialize this connector.booleanisFileCacheEnabled()Is the fileCache enabled.voidrequestEndEvent(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.voidrequestStartEvent(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.voidsetCrlFile(String crlFile)Sets the location of the CRL file.voidsetFileCacheEnabled(boolean fileCacheEnabled)Is the file caching mechanism enabled.voidsetKeepAliveThreadCount(int number)Sets the number of keep-alive threadsvoidsetKeepAliveTimeoutInSeconds(int timeout)Sets the number of seconds before a keep-alive connection that has been idle times out and is closed.voidsetKeystoreType(String type)Sets the keystore type of this connector.voidsetLargeFileCacheEnabled(boolean isLargeEnabled)Is the large file cache support enabled.voidsetMaxAcceptWorkerThreads(int maxAcceptWorkerThreads)Set thereader-threadfrom domian.xml.voidsetMaxCacheEntries(int mEntries)Set the maximum entries this cache can contains.voidsetMaxEntrySize(long mEntrySize)Set the maximum size aFileCacheEntrycan have.voidsetMaxLargeCacheSize(long mCacheSize)Set the maximum cache sizevoidsetMaxReadWorkerThreads(int maxReadWorkerThreads)Set thereader-threadfrom domian.xml.voidsetMaxSmallCacheSize(long mCacheSize)Set the maximum cache sizevoidsetMinAcceptQueueLength(int minAcceptQueueLength)Set theacceptor-queue-lengthvalue on thisSelectorvoidsetMinEntrySize(long mSize)Set the maximum size aFileCacheEntrycan have.voidsetMinProcessorQueueLength(int minProcessorQueueLength)Set theprocessor-queue-lengthvalue on thisSelectorvoidsetMinReadQueueLength(int minReadQueueLength)Set thereader-queue-lengthvalue on thisSelectorvoidsetProcessorWorkerThreadsTimeout(int timeout)voidsetProxyHandler(String className)voidsetQueueSizeInBytes(int queueSizeInBytes)Set the maximum pending connection thisConnectorcan handle.voidsetRecycleObjects(boolean recycleObjects)Set therecycle-tasksused by thisSelectorvoidsetSecondsMaxAge(int sMaxAges)The timeout in seconds before remove aFileCacheEntryfrom thefileCachevoidsetSelectorReadThreadsCount(int selectorReadThreadsCount)voidsetSocketServerBacklog(int ssBackLog)Set theSocketServerbacklog.voidsetTrustAlgorithm(String trustAlgorithm)Sets the trust management algorithmvoidsetTrustMaxCertLength(String trustMaxCertLength)Sets the maximum number of non-self-issued intermediate certificates that may exist in a certification pathvoidsetTruststore(String truststore)Sets the truststore location of this connector.voidsetTruststoreType(String type)Sets the truststore type of this connector.voidsetUseDirectByteBuffer(boolean useDirectByteBuffer)Set theuse-nio-non-blockingby thisSelectorvoidsetWebAppRootPath(String rootFolder)Set the documenr root foldervoidstart()Begin processing requests via this Connector.voidstop()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:
createRequestin interfaceConnector- Overrides:
createRequestin classConnector
-
createResponse
public Response createResponse()
Creates and returns Response object.- Specified by:
createResponsein interfaceConnector- Overrides:
createResponsein 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 thisConnectorcan handle.
-
getQueueSizeInBytes
public int getQueueSizeInBytes()
Return the maximum pending connection.
-
setSocketServerBacklog
public void setSocketServerBacklog(int ssBackLog)
Set theSocketServerbacklog.
-
getSocketServerBacklog
public int getSocketServerBacklog()
Return the maximum pending connection.
-
setRecycleObjects
public void setRecycleObjects(boolean recycleObjects)
Set therecycle-tasksused by thisSelector
-
getRecycleObjects
public boolean getRecycleObjects()
Return therecycle-tasksused by thisSelector
-
setMaxReadWorkerThreads
public void setMaxReadWorkerThreads(int maxReadWorkerThreads)
Set thereader-threadfrom domian.xml.
-
getMaxReadWorkerThreads
public int getMaxReadWorkerThreads()
Return theread-threadused by thisSelector
-
setMaxAcceptWorkerThreads
public void setMaxAcceptWorkerThreads(int maxAcceptWorkerThreads)
Set thereader-threadfrom domian.xml.
-
getMaxAcceptWorkerThreads
public int getMaxAcceptWorkerThreads()
Return theread-threadused by thisSelector
-
setMinAcceptQueueLength
public void setMinAcceptQueueLength(int minAcceptQueueLength)
Set theacceptor-queue-lengthvalue on thisSelector
-
getMinAcceptQueueLength
public int getMinAcceptQueueLength()
Return theacceptor-queue-lengthvalue on thisSelector
-
setMinReadQueueLength
public void setMinReadQueueLength(int minReadQueueLength)
Set thereader-queue-lengthvalue on thisSelector
-
getMinReadQueueLength
public int getMinReadQueueLength()
Return thereader-queue-lengthvalue on thisSelector
-
setMinProcessorQueueLength
public void setMinProcessorQueueLength(int minProcessorQueueLength)
Set theprocessor-queue-lengthvalue on thisSelector
-
getMinProcessorQueueLength
public int getMinProcessorQueueLength()
Return theprocessor-queue-lengthvalue on thisSelector
-
setUseDirectByteBuffer
public void setUseDirectByteBuffer(boolean useDirectByteBuffer)
Set theuse-nio-non-blockingby thisSelector
-
getUseDirectByteBuffer
public boolean getUseDirectByteBuffer()
Return theuse-nio-non-blockingused 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 LifecycleExceptionDescription copied from class:ConnectorBegin processing requests via this Connector.- Specified by:
startin interfaceLifecycle- Overrides:
startin classConnector- Throws:
LifecycleException- if a fatal startup error occurs
-
stop
public void stop() throws LifecycleExceptionDescription copied from class:ConnectorTerminate processing requests via this Connector.- Specified by:
stopin interfaceLifecycle- Overrides:
stopin classConnector- Throws:
LifecycleException- if a fatal shutdown error occurs
-
setSecondsMaxAge
public void setSecondsMaxAge(int sMaxAges)
The timeout in seconds before remove aFileCacheEntryfrom 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 aFileCacheEntrycan have.
-
getMinEntrySize
public long getMinEntrySize()
Get the maximum size aFileCacheEntrycan have.
-
setMaxEntrySize
public void setMaxEntrySize(long mEntrySize)
Set the maximum size aFileCacheEntrycan have.
-
getMaxEntrySize
public long getMaxEntrySize()
Get the maximum size aFileCacheEntrycan 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 LifecycleExceptionInitialize this connector.- Specified by:
initializein interfaceConnector- Overrides:
initializein 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:
requestStartEventin 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:
requestEndEventin 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
-
-