com.sun.enterprise.web.connector.coyote
Class PECoyoteConnector

java.lang.Object
  extended by org.apache.catalina.connector.Connector
      extended by com.sun.enterprise.web.connector.coyote.PECoyoteConnector
All Implemented Interfaces:
javax.management.MBeanRegistration, Connector, Lifecycle
Direct Known Subclasses:
WebConnector

public class PECoyoteConnector
extends Connector


Field Summary
protected static java.util.logging.Logger _logger
           
protected static java.util.ResourceBundle _rb
           
protected  GrizzlyConfig grizzlyMonitor
          The monitoring classes used to gather stats.
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 minProcessorWorkerThreadsIncrement
          The increment number used by the processor threads.
protected  int minReadQueueLength
          The size of the read queue
protected  int processorWorkerThreadsTimeout
          The request timeout value used by the processor threads.
protected  boolean recycleObjects
          Are we recycling objects
protected  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, log, mapper, mapperListener, maxParameterCount, minProcessors, mserver, oname, proxyHandler, sm
 
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
PECoyoteConnector(WebContainer webContainer)
          Constructor
 
Method Summary
 void configHttpProperties(com.sun.grizzly.config.dom.Http http, com.sun.grizzly.config.dom.Transport transport, com.sun.grizzly.config.dom.Ssl ssl)
           
 void configure(com.sun.grizzly.config.dom.NetworkListener listener, boolean isSecure, HttpService httpService)
           
 void configureFileCache(com.sun.grizzly.config.dom.FileCache fileCache)
          Configure the Grizzly FileCache mechanism
 boolean configureHttpListenerProperty(java.lang.String propName, java.lang.String propValue)
          Configure http-listener property.
 void configureJKProperties(com.sun.grizzly.config.dom.NetworkListener listener)
           
 void configureThreadPool(com.sun.grizzly.config.dom.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.
 java.lang.String getCrlFile()
          Gets the location of the CRL file
 int 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.
 java.lang.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 the read-thread used by this Selector
 int getMaxCacheEntries()
          Return the maximum entries this cache can contains.
 long getMaxEntrySize()
          Get the maximum size a FileCacheEntry can have.
 long getMaxLargeCacheSize()
          Get the maximum cache size
 int getMaxReadWorkerThreads()
          Return the read-thread used by this Selector
 long getMaxSmallCacheSize()
          Get the maximum cache size
 int getMinAcceptQueueLength()
          Return the acceptor-queue-length value on this Selector
 long getMinEntrySize()
          Get the maximum size a FileCacheEntry can have.
 int getMinProcessorQueueLength()
          Return the processor-queue-length value on this Selector
 int getMinProcessorWorkerThreadsIncrement()
           
 int getMinReadQueueLength()
          Return the reader-queue-length value on this Selector
 int getProcessorWorkerThreadsTimeout()
           
 int getQueueSizeInBytes()
          Return the maximum pending connection.
 boolean getRecycleObjects()
          Return the recycle-tasks used by this Selector
 int getSecondsMaxAge()
           
 int getSelectorReadThreadsCount()
           
 int getSocketServerBacklog()
          Return the maximum pending connection.
 java.lang.String getTrustAlgorithm()
          Gets the trust management algorithm
 java.lang.String getTrustMaxCertLength()
          Gets the maximum number of non-self-issued intermediate certificates that may exist in a certification path
 java.lang.String getTruststore()
          Gets the truststore location of this connector.
 java.lang.String getTruststoreType()
          Gets the truststore type of this connector.
 boolean getUseDirectByteBuffer()
          Return the use-nio-non-blocking used by this Selector
 java.lang.String getWebAppRootPath()
          Return the folder's root where application are deployed.
 void initialize()
          Initialize this connector.
 boolean isChunkingDisabled()
           
 boolean isFileCacheEnabled()
          Is the fileCache enabled.
 void requestEndEvent(javax.servlet.http.HttpServletRequest request, Host host, Context context, int statusCode, com.sun.grizzly.tcp.RequestInfo reqInfo)
          Fires probe event related to the fact that the given request is about to exit from the web container.
 void requestStartEvent(javax.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 setChunkingDisabled(boolean chunkingDisabled)
          Enables or disables chunked encoding for any responses returned by this connector.
 void setCrlFile(java.lang.String crlFile)
          Sets the location of the CRL file.
 void setFileCacheEnabled(boolean fileCacheEnabled)
          Is the file caching mechanism enabled.
 void setKeepAliveTimeoutInSeconds(int timeout)
          Sets the number of seconds before a keep-alive connection that has been idle times out and is closed.
 void setKeystoreType(java.lang.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 the reader-thread from domian.xml.
 void setMaxCacheEntries(int mEntries)
          Set the maximum entries this cache can contains.
 void setMaxEntrySize(long mEntrySize)
          Set the maximum size a FileCacheEntry can have.
 void setMaxLargeCacheSize(long mCacheSize)
          Set the maximum cache size
 void setMaxReadWorkerThreads(int maxReadWorkerThreads)
          Set the reader-thread from domian.xml.
 void setMaxSmallCacheSize(long mCacheSize)
          Set the maximum cache size
 void setMinAcceptQueueLength(int minAcceptQueueLength)
          Set the acceptor-queue-length value on this Selector
 void setMinEntrySize(long mSize)
          Set the maximum size a FileCacheEntry can have.
 void setMinProcessorQueueLength(int minProcessorQueueLength)
          Set the processor-queue-length value on this Selector
 void setMinReadQueueLength(int minReadQueueLength)
          Set the reader-queue-length value on this Selector
 void setProcessorWorkerThreadsTimeout(int timeout)
           
 void setProxyHandler(java.lang.String className)
           
 void setQueueSizeInBytes(int queueSizeInBytes)
          Set the maximum pending connection this Connector can handle.
 void setRecycleObjects(boolean recycleObjects)
          Set the recycle-tasks used by this Selector
 void setSecondsMaxAge(int sMaxAges)
          The timeout in seconds before remove a FileCacheEntry from the fileCache
 void setSelectorReadThreadsCount(int selectorReadThreadsCount)
           
 void setSocketServerBacklog(int ssBackLog)
          Set the SocketServer backlog.
 void setTrustAlgorithm(java.lang.String trustAlgorithm)
          Sets the trust management algorithm
 void setTrustMaxCertLength(java.lang.String trustMaxCertLength)
          Sets the maximum number of non-self-issued intermediate certificates that may exist in a certification path
 void setTruststore(java.lang.String truststore)
          Sets the truststore location of this connector.
 void setTruststoreType(java.lang.String type)
          Sets the truststore type of this connector.
 void setUseDirectByteBuffer(boolean useDirectByteBuffer)
          Set the use-nio-non-blocking by this Selector
 void setWebAppRootPath(java.lang.String rootFolder)
          Set the documenr root folder
 void start()
           
 void stop()
           
 
Methods inherited from class org.apache.catalina.connector.Connector
addLifecycleListener, createObjectName, destroy, findLifecycleListeners, getAcceptCount, getAdapter, getAddress, getAllowTrace, getAuthPassthroughEnabled, getBlocking, getBufferSize, getCertificates, getCiphers, getClientAuth, getCompression, getConnectionLinger, getConnectionTimeout, getConnectionUploadTimeout, getContainer, getController, getDebug, getDefaultHost, getDisableUploadTimeout, getDomain, getEnableLookups, getFactory, getInfo, getInstanceName, getKeepAlive, getKeyAlias, getKeystoreFile, getKeystorePass, getMapper, getMaxHttpHeaderSize, getMaxKeepAliveRequests, getMaxParameterCount, getMaxPostSize, getMaxProcessors, getMinProcessors, getName, getObjectName, getPort, getProperty, getProtocol, getProtocolHandler, getProtocolHandlerClassName, getProxyHandler, getProxyName, getProxyPort, getRedirectPort, getScheme, getSecure, getSelectorThreadImpl, getServerSocketTimeout, getService, getSsl3SessionTimeout, getSslProtocol, getSslProtocols, getSslSessionCacheSize, getSslSessionTimeout, getTcpNoDelay, getTomcatAuthentication, getURIEncoding, init, isAvailable, isEnabled, isXpoweredBy, postDeregister, postRegister, preDeregister, preRegister, removeLifecycleListener, removeProperty, setAcceptCount, setAdapter, setAddress, setAllowTrace, setAuthPassthroughEnabled, setBlocking, setBufferSize, setCiphers, setClientAuth, setCompression, setConnectionLinger, setConnectionTimeout, setConnectionUploadTimeout, setContainer, setController, setDebug, setDefaultHost, setDisableUploadTimeout, setDomain, setEnabled, setEnableLookups, setFactory, setInstanceName, setKeepAlive, setKeyAlias, setKeystoreFile, setKeystorePass, setMapper, setMaxHttpHeaderSize, setMaxKeepAliveRequests, setMaxParameterCount, setMaxPostSize, setMaxProcessors, setMinProcessors, setName, setPort, setProperty, setProtocol, setProtocolHandler, setProtocolHandlerClassName, setProxyHandler, setProxyName, setProxyPort, setRedirectPort, setScheme, setSecure, setSelectorThreadImpl, setServerSocketTimeout, setService, setSsl3SessionTimeout, setSslProtocol, setSslProtocols, setSslSessionCacheSize, setSslSessionTimeout, setTcpNoDelay, setTomcatAuthentication, setURIEncoding, setXpoweredBy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_logger

protected static final java.util.logging.Logger _logger

_rb

protected static final java.util.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.


minProcessorWorkerThreadsIncrement

protected int minProcessorWorkerThreadsIncrement
The increment number 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.

Constructor Detail

PECoyoteConnector

public PECoyoteConnector(WebContainer webContainer)
Constructor

Method Detail

setChunkingDisabled

public void setChunkingDisabled(boolean chunkingDisabled)
Enables or disables chunked encoding for any responses returned by this connector.

Parameters:
chunkingDisabled - true if chunking is to be disabled, false otherwise

isChunkingDisabled

public boolean isChunkingDisabled()
Returns:
true if chunking is disabled on this Connector, and false otherwise

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 interface Connector
Overrides:
createRequest in class Connector

createResponse

public Response createResponse()
Creates and returns Response object.

Specified by:
createResponse in interface Connector
Overrides:
createResponse in class Connector
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

setQueueSizeInBytes

public void setQueueSizeInBytes(int queueSizeInBytes)
Set the maximum pending connection this Connector can handle.


getQueueSizeInBytes

public int getQueueSizeInBytes()
Return the maximum pending connection.


setSocketServerBacklog

public void setSocketServerBacklog(int ssBackLog)
Set the SocketServer backlog.


getSocketServerBacklog

public int getSocketServerBacklog()
Return the maximum pending connection.


setRecycleObjects

public void setRecycleObjects(boolean recycleObjects)
Set the recycle-tasks used by this Selector


getRecycleObjects

public boolean getRecycleObjects()
Return the recycle-tasks used by this Selector


setMaxReadWorkerThreads

public void setMaxReadWorkerThreads(int maxReadWorkerThreads)
Set the reader-thread from domian.xml.


getMaxReadWorkerThreads

public int getMaxReadWorkerThreads()
Return the read-thread used by this Selector


setMaxAcceptWorkerThreads

public void setMaxAcceptWorkerThreads(int maxAcceptWorkerThreads)
Set the reader-thread from domian.xml.


getMaxAcceptWorkerThreads

public int getMaxAcceptWorkerThreads()
Return the read-thread used by this Selector


setMinAcceptQueueLength

public void setMinAcceptQueueLength(int minAcceptQueueLength)
Set the acceptor-queue-length value on this Selector


getMinAcceptQueueLength

public int getMinAcceptQueueLength()
Return the acceptor-queue-length value on this Selector


setMinReadQueueLength

public void setMinReadQueueLength(int minReadQueueLength)
Set the reader-queue-length value on this Selector


getMinReadQueueLength

public int getMinReadQueueLength()
Return the reader-queue-length value on this Selector


setMinProcessorQueueLength

public void setMinProcessorQueueLength(int minProcessorQueueLength)
Set the processor-queue-length value on this Selector


getMinProcessorQueueLength

public int getMinProcessorQueueLength()
Return the processor-queue-length value on this Selector


setUseDirectByteBuffer

public void setUseDirectByteBuffer(boolean useDirectByteBuffer)
Set the use-nio-non-blocking by this Selector


getUseDirectByteBuffer

public boolean getUseDirectByteBuffer()
Return the use-nio-non-blocking used by this Selector


setProcessorWorkerThreadsTimeout

public void setProcessorWorkerThreadsTimeout(int timeout)

getProcessorWorkerThreadsTimeout

public int getProcessorWorkerThreadsTimeout()

getMinProcessorWorkerThreadsIncrement

public int getMinProcessorWorkerThreadsIncrement()

setSelectorReadThreadsCount

public void setSelectorReadThreadsCount(int selectorReadThreadsCount)

getSelectorReadThreadsCount

public int getSelectorReadThreadsCount()

start

public void start()
           throws LifecycleException
Specified by:
start in interface Lifecycle
Overrides:
start in class Connector
Throws:
LifecycleException

stop

public void stop()
          throws LifecycleException
Specified by:
stop in interface Lifecycle
Overrides:
stop in class Connector
Throws:
LifecycleException

setSecondsMaxAge

public void setSecondsMaxAge(int sMaxAges)
The timeout in seconds before remove a FileCacheEntry from the fileCache


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 a FileCacheEntry can have.


getMinEntrySize

public long getMinEntrySize()
Get the maximum size a FileCacheEntry can have.


setMaxEntrySize

public void setMaxEntrySize(long mEntrySize)
Set the maximum size a FileCacheEntry can have.


getMaxEntrySize

public long getMaxEntrySize()
Get the maximum size a FileCacheEntry 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(java.lang.String rootFolder)
Set the documenr root folder


getWebAppRootPath

public java.lang.String getWebAppRootPath()
Return the folder's root where application are deployed.


initialize

public void initialize()
                throws LifecycleException
Initialize this connector.

Specified by:
initialize in interface Connector
Overrides:
initialize in class Connector
Throws:
LifecycleException

setTruststore

public void setTruststore(java.lang.String truststore)
Sets the truststore location of this connector.

Parameters:
truststore - The truststore location

getTruststore

public java.lang.String getTruststore()
Gets the truststore location of this connector.

Returns:
The truststore location

setTruststoreType

public void setTruststoreType(java.lang.String type)
Sets the truststore type of this connector.

Parameters:
type - The truststore type

getTruststoreType

public java.lang.String getTruststoreType()
Gets the truststore type of this connector.

Returns:
The truststore type

setKeystoreType

public void setKeystoreType(java.lang.String type)
Sets the keystore type of this connector.

Parameters:
type - The keystore type

getKeystoreType

public java.lang.String getKeystoreType()
Gets the keystore type of this connector.

Returns:
The keystore type

getCrlFile

public java.lang.String getCrlFile()
Gets the location of the CRL file

Returns:
The location of the CRL file

setCrlFile

public void setCrlFile(java.lang.String crlFile)
Sets the location of the CRL file.

Parameters:
crlFile - The location of the CRL file

getTrustAlgorithm

public java.lang.String getTrustAlgorithm()
Gets the trust management algorithm

Returns:
The trust management algorithm

setTrustAlgorithm

public void setTrustAlgorithm(java.lang.String trustAlgorithm)
Sets the trust management algorithm

Parameters:
trustAlgorithm - The trust management algorithm

getTrustMaxCertLength

public java.lang.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(java.lang.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(com.sun.grizzly.config.dom.NetworkListener listener,
                      boolean isSecure,
                      HttpService httpService)

configureJKProperties

public void configureJKProperties(com.sun.grizzly.config.dom.NetworkListener listener)

configureFileCache

public void configureFileCache(com.sun.grizzly.config.dom.FileCache fileCache)
Configure the Grizzly FileCache mechanism

Parameters:
fileCache -

configureThreadPool

public void configureThreadPool(com.sun.grizzly.config.dom.ThreadPool pool)
Configures this connector from the given thread-pool configuration bean.

Parameters:
pool - the thread-pool configuration bean

configureHttpListenerProperty

public boolean configureHttpListenerProperty(java.lang.String propName,
                                             java.lang.String propValue)
                                      throws java.lang.NumberFormatException
Configure http-listener property. return true if the property exists and has been set.

Throws:
java.lang.NumberFormatException

configHttpProperties

public void configHttpProperties(com.sun.grizzly.config.dom.Http http,
                                 com.sun.grizzly.config.dom.Transport transport,
                                 com.sun.grizzly.config.dom.Ssl ssl)

setProxyHandler

public void setProxyHandler(java.lang.String className)

requestStartEvent

public void requestStartEvent(javax.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 class Connector
Parameters:
request - the request object
host - the virtual server to which the request was mapped
context - the Context to which the request was mapped

requestEndEvent

public void requestEndEvent(javax.servlet.http.HttpServletRequest request,
                            Host host,
                            Context context,
                            int statusCode,
                            com.sun.grizzly.tcp.RequestInfo reqInfo)
Fires probe event related to the fact that the given request is about to exit from the web container.

Overrides:
requestEndEvent in class Connector
Parameters:
request - the request object
host - the virtual server to which the request was mapped
context - the Context to which the request was mapped
statusCode - the response status code


Copyright © 2012 GlassFish Community. All Rights Reserved.