com.sun.enterprise.web.connector.grizzly
Class SelectorThread

java.lang.Object
  extended by java.lang.Thread
      extended by com.sun.enterprise.web.connector.grizzly.SelectorThread
All Implemented Interfaces:
Runnable, MBeanRegistration
Direct Known Subclasses:
SelectorBlockingThread, SelectorReadThread, SSLSelectorThread

public class SelectorThread
extends Thread
implements MBeanRegistration

This class implement an NIO socket HTTP Listener. This class supports three stagegy: Mode Blocking: This mode uses NIO blocking mode, and doesn't uses any of the java.nio.* classes. Mode Non-Blocking: This mode uses NIO non blocking mode and read the entire request stream before processing the request. The stragegy used is to find the content-lenght header and buffer bytes until the end of the stream is read.

Author:
Jean-Francois Arcand

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  Queue<ProcessorTask> activeProcessorTasks
          List of active ProcessorTask.
protected  Adapter adapter
          Associated adapter.
protected  Class algorithmClass
          The Algorithm used to predict the end of the NIO stream
protected  String algorithmClassName
          The Algorithm used to parse the NIO stream.
protected  boolean asyncExecution
          Is asynchronous mode enabled?
protected  AsyncHandler asyncHandler
          When the asynchronous mode is enabled, the execution of this object will be delegated to the AsyncHandler
protected  Queue<SelectionKey> bannedKeys
          Banned SelectionKey registration.
protected  boolean bufferResponse
          Buffer the response until the buffer is full.
protected  String compressableMimeTypes
           
protected  String compression
          Compression value.
protected  int compressionMinSize
           
protected  int currentConnectionNumber
          The current number of simulatenous connection.
static String DEFAULT_ALGORITHM
          The default NIO stream algorithm.
protected static boolean defaultAlgorithmInstalled
          Is the DEFAULT_ALGORITHM used.
protected  String defaultResponseType
          The default response-type
protected  boolean disableUploadTimeout
          Flag to disable setting a different time-out on uploads.
protected  boolean displayConfiguration
          If true, display the NIO configuration information.
protected  String domain
           
protected  boolean enableNioLogging
          Grizzly own debug flag.
protected  FileCacheFactory fileCacheFactory
          The FileCacheFactory associated with this Selector
protected  String forcedRequestType
          The forced request-type
protected  RequestGroupInfo globalRequestProcessor
          Monitoring object used to store information.
protected  ObjectName globalRequestProcessorName
           
protected  InetAddress inet
           
protected  boolean initialized
           
protected  boolean isFileCacheEnabled
          Is the FileCache enabled.
protected  boolean isLargeFileCacheEnabled
          Is the large FileCache enabled.
protected  boolean isMonitoringEnabled
          Is monitoring already started.
protected  boolean isWaiting
          Is this Selector currently in Wating mode?
protected  KeepAlivePipeline keepAlivePipeline
          Keep-Alive subsystem.
protected  int keepAliveTimeoutInSeconds
           
protected  int linger
           
protected static Logger logger
          The logger used by the grizzly classes.
protected  int maxCacheEntries
          The maximum entries in the fileCache
protected  long maxEntrySize
          The maximum size of a cached resources.
protected  int maxHttpHeaderSize
          Default HTTP header buffer size.
protected  int maxKeepAliveRequests
           
protected  long maxLargeFileCacheSize
          The maximum cached bytes
protected  int maxPostSize
           
protected  int maxProcessorWorkerThreads
          Maximum number of WorkerThread
protected  int maxQueueSizeInBytes
          Maximum pending connection before refusing requests.
protected  int maxReadWorkerThreads
          Maximum number of ReadWorkerThread
protected  int maxSelectors
          Maximum number of Selectors in the SelectorFactory pool
protected  long maxSmallFileCacheSize
          The maximum cached bytes
protected  long minEntrySize
          The maximum size of a cached resources.
protected  int minProcessorQueueLength
          Number of polled ProcessorTask instance.
protected  int minReadQueueLength
          Number of polled Read*Task instance.
protected  int minSpareThreads
          Minimum numbers of WorkerThread before creating new thread.
protected  int minWorkerThreads
          Minimum numbers of WorkerThread created
protected  MBeanServer mserver
           
protected  int multiSelectorsCount
          The number of SelectorReadThread
protected  String noCompressionUserAgents
           
protected  ObjectName oname
           
protected  boolean oOBInline
           
protected  String pipelineClassName
          The default Pipeline used.
protected  PipelineStatistic pipelineStat
          Placeholder for Pipeline statistic.
protected  int port
           
protected  Pipeline processorPipeline
          The queue shared by this thread and the code>ProcessorTask.
protected  Queue<ProcessorTask> processorTasks
          ConcurrentLinkedQueue used as an object pool.
protected  ObjectName processorWorkerThreadName
           
protected  Pipeline readPipeline
          The queue shared by this thread and code>ReadTask
protected  Queue<ReadTask> readTasks
          ConcurrentLinkedQueue used as an object pool.
protected  MultiSelectorThread[] readThreads
          The Selector used to register OP_READ
protected  boolean recycleTasks
          Recycle the Task after running them
protected  int requestBufferSize
          The input request buffer size.
protected  String restrictedUserAgents
           
protected static String rootFolder
          The root folder where application are deployed
protected  boolean running
           
protected  int secondsMaxAge
          Timeout before remove the static resource from the cache.
protected  Selector selector
          The Selector used by the connector.
protected static int selectorTimeout
          The Selector timeout value.
static String SERVER_NAME
           
protected  ServerSocket serverSocket
           
protected  ServerSocketChannel serverSocketChannel
          The ServerSocketChannel used in blocking mode.
protected  int serverTimeout
           
protected  boolean socketKeepAlive
           
protected  int socketReceiveBufferSize
           
protected  int socketSendBufferSize
           
protected  int socketTimeout
           
protected  int ssBackLog
          Server socket backlog.
protected  boolean tcpNoDelay
           
protected  int threadsIncrement
          The number used when increamenting the Pipeline thread pool.
protected  int threadsTimeout
          The timeout used by the thread when processing a request.
protected  int uploadTimeout
          Maximum timeout on uploads.
protected  boolean useByteBufferView
          Create view ByteBuffer from another ByteBuffer
protected  boolean useDirectByteBuffer
          Is the ByteBuffer used by the ReadTask use direct ByteBuffer or not.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SelectorThread()
          Create the Selector object.
 
Method Summary
 void addBannedSelectionKey(SelectionKey key)
          Add a SelectionKey to the banned list of SelectionKeys.
 void cancelKey(SelectionKey key)
          Cancel the current SelectionKey
 boolean cancelThreadExecution(long cancelThreadID)
          Cancel the threadID execution.
protected  void clearTasks()
          Clear all cached Tasks
protected  void configureCompression(DefaultProcessorTask processorTask)
           
protected  ProcessorTask configureProcessorTask(DefaultProcessorTask task)
           
protected  void configureReadThread(SelectorThread multiSelector)
           
 void disableMonitoring()
          Disable gathering of monitoring datas.
protected  void disablePipelineStats()
          Removes PipelineStatistic from every Pipeline, when monitoring has been turned off.
protected  void doSelect()
          Execute a Selector.select() operation.
 void enableCometSupport(boolean enableComet)
          Enable Comet/Poll request support.
 void enableMonitoring()
          Enable gathering of monitoring datas.
protected  void enablePipelineStats()
          Injects PipelineStatistic into every Pipeline, for monitoring purposes.
 void enableRcmSupport(boolean rcmSupport)
          Enable Application Resource Allocation Grizzly Extension.
 void enableSelectionKeys()
          Enable all registered interestOps.
protected  void expireIdleKeys()
          Cancel keep-alive connections.
 Queue<ProcessorTask> getActiveProcessorTasks()
           
 Adapter getAdapter()
          Get the associated adapter.
 InetAddress getAddress()
           
 Class getAlgorithmClass()
           
 String getAlgorithmClassName()
           
 AsyncHandler getAsyncHandler()
          Return the AsyncHandler used when asynchronous execution is enabled.
 boolean getBufferResponse()
          Return true if the reponse is buffered.
 int getBufferSize()
          Return the request input buffer size
 ClassLoader getClassLoader()
           
 String getCompressableMimeTypes()
           
 String getCompression()
           
 int getCompressionMinSize()
           
 int getCountThreadsIdleStats()
           
 int getCountThreadsStats()
          PWCThreadPool Stats
 int getCurReadThread()
           
 int getCurrentBusyProcessorThreads()
          Provides the count of request threads that are currently being processed by the container
 int getCurrentConnectionNumber()
           
 int getCurrentThreadCountStats()
          HTTPListener Stats
 int getCurrentThreadsBusyStats()
           
 String getDefaultResponseType()
           
 boolean getDisableUploadTimeout()
          Get the flag that controls upload time-outs.
 String getDomain()
           
 boolean getEnableAsyncExecution()
          Return true when asynchronous execution is enabled.
 String getForcedRequestType()
           
 RequestGroupInfo getGlobalRequestProcessor()
           
 ObjectName getGlobalRequestProcessorName()
           
 InetAddress getInet()
           
 int getKaTimeout()
           
 ObjectName getKeepAliveMbeanName()
           
 KeepAlivePipeline getKeepAlivePipeline()
           
 KeepAliveStats getKeepAliveStats()
           
 int getKeepAliveTimeoutInSeconds()
          Gets the number of seconds before a keep-alive connection that has been idle times out and is closed.
 Queue<SelectionKey> getKeysToEnable()
           
 boolean getLargeFileCacheEnabled()
          Is the large file cache support enabled.
 int getLinger()
           
static Logger getLogger()
           
 Management getManagement()
           
 int getMaxCacheEntries()
          Return the maximum entries this cache can contains.
 long getMaxEntrySize()
          Get the maximum size a FileCacheEntry can have.
 int getMaxHttpHeaderSize()
           
 int getMaxKeepAliveRequests()
           
 long getMaxLargeCacheSize()
          Get the maximum cache size
 int getMaxPostSize()
           
 int getMaxProcessorWorkerThreads()
           
 int getMaxQueueSizeInBytes()
           
 int getMaxReadWorkerThreads()
           
 int getMaxSelectors()
           
 long getMaxSmallCacheSize()
          Get the maximum cache size
 int getMaxSpareThreads()
           
 int getMaxSpareThreadsStats()
           
 int getMaxThreads()
           
 int getMaxThreadsStats()
           
 long getMinEntrySize()
          Get the maximum size a FileCacheEntry can have.
 int getMinProcessorQueueLength()
           
 int getMinReadQueueLength()
           
 int getMinSpareThreads()
           
 int getMinSpareThreadsStats()
           
 int getMinWorkerThreads()
           
 MBeanServer getMserver()
           
 long getNextKeysExpiration()
           
 String getNoCompressionUserAgents()
           
 ObjectName getObjectName()
           
 ObjectName getOname()
           
 String getPipelineClassName()
           
 PipelineStatistic getPipelineStat()
           
 int getPort()
           
 int getPortLowLevel()
          Use the method to get the actual port which is different from the requested port in case port 0 was requested.
 Pipeline getProcessorPipeline()
           
 ProcessorTask getProcessorTask()
          Return a ProcessorTask from the pool.
 Queue<ProcessorTask> getProcessorTasks()
           
 ObjectName getProcessorWorkerThreadName()
           
 ObjectName getPwcConnectionQueueMbeanName()
           
 ObjectName getPwcFileCacheMbeanName()
           
 int getQueueSizeInBytes()
          Get the maximum pending connection this Pipeline can handle.
 Pipeline getReadPipeline()
          Return the Pipeline used to handle OP_READ.
 ReadTask getReadTask(SelectionKey key)
          Return a ReadTask from the pool.
 Queue<ReadTask> getReadTasks()
           
 RequestGroupInfo getRequestGroupInfo()
           
 String getRestrictedUserAgents()
           
 boolean getReuseAddress()
           
static String getRootFolder()
           
 Selector getSelector()
           
static SelectorThread getSelector(int port)
          Return the SelectorThread which listen on port, or null if there is no SelectorThread.
 int getSelectorReadThreadsCount()
           
static Enumeration<SelectorThread> getSelectors()
          Return an Enumeration of the active SelectorThreads
static int getSelectorTimeout()
           
 ServerSocket getServerSocket()
           
 ServerSocketChannel getServerSocketChannel()
           
 int getServerSoTimeout()
           
 int getServerTimeout()
           
 int getSocketReceiveBufferSize()
           
 int getSocketSendBufferSize()
           
 int getSocketTimeout()
           
 int getSoLinger()
           
 int getSoTimeout()
           
 int getSpinRate()
           
 int getSsBackLog()
           
 boolean getTcpNoDelay()
           
 int getThreadsIncrement()
           
 int getThreadsTimeout()
           
 int getTimeout()
          Get the upload timeout.
 int getTransactionTimeout()
          Set the maximum time, in milliseconds, a WorkerThread executing an instance of this class can execute.
static String getWebAppRootPath()
          Return the folder's root where application are deployed.
protected  void handleAccept(SelectionKey key)
          Handle OP_ACCEPT
protected  void handleConnection(SelectionKey key)
          Handle an incoming operation on the channel.
protected  ReadTask handleRead(SelectionKey key)
          Handle OP_READ
protected  void initAlgorithm()
          Load using reflection the Algorithm class.
 void initEndpoint()
          initialized the endpoint by creating the ServerScoketChannel and by initializing the server socket.
protected  void initFileCacheFactory()
          Initialize the fileCacheFactory associated with this instance
protected  void initKeepAlivePipeline()
          Initialize the keep-alive mechanism.
protected  void initMonitoringLevel()
           
protected  void initMultiSelectors()
          Initialize SelectorReadThread used to process OP_READ operations.
protected  void initPipeline()
          Init the Pipelines used by the WorkerThreads.
protected  void initProcessorTask(int size)
          Create a pool of ProcessorTask
protected  void initReadTask(int size)
          Create a pool of ReadTask
 boolean isBufferResponse()
           
 boolean isDisplayConfiguration()
           
 boolean isEnableNioLogging()
           
 boolean isFileCacheEnabled()
          Is the fileCache enabled.
 boolean isInitialized()
           
 boolean isIsMonitoringEnabled()
           
 boolean isMonitoringEnabled()
          Returns true if monitoring has been enabled, false otherwise.
 boolean isRecycleTasks()
           
 boolean isRunning()
           
 boolean isSocketKeepAlive()
           
 boolean isTcpNoDelay()
           
 boolean isUseByteBufferView()
           
 boolean isUseDirectByteBuffer()
           
static Logger logger()
          Return the logger used by the Grizzly classes.
protected  Pipeline newPipeline(int maxThreads, int minThreads, String name, int port, int priority)
          Create a new Pipeline instance using the pipelineClassName value.
protected  ProcessorTask newProcessorTask(boolean initialize)
          Create ProcessorTask objects and configure it to be ready to proceed request.
protected  ReadTask newReadTask()
          Return a new ReadTask instance
 void postDeregister()
           
 void postRegister(Boolean registrationDone)
           
 void preDeregister()
           
 ObjectName preRegister(MBeanServer server, ObjectName name)
           
protected  void rampUpProcessorTask()
          Initialize ProcessorTask
protected  void reconfigureAsyncExecution()
          Reconfigure Grizzly Asynchronous Request Processing(ARP) internal objects.
protected  void registerComponents()
          Register JMX components.
 void registerKey(SelectionKey key)
          Register a SelectionKey to this Selector running of this thread.
 void removeCacheEntry(String contextPath)
          Remove a context path from the FileCache.
 void resetSpinCounter()
           
 void returnTask(Task task)
          Returns the Task object to the pool.
 void run()
          Start the endpoint (this)
 void setActiveProcessorTasks(Queue<ProcessorTask> activeProcessorTasks)
           
 void setAdapter(Adapter adapter)
          Set the associated adapter.
 void setAddress(InetAddress inet)
           
 void setAlgorithmClass(Class algorithmClass)
           
 void setAlgorithmClassName(String algorithmClassName)
           
 void setAsyncHandler(AsyncHandler asyncHandler)
          Set the AsyncHandler used when asynchronous execution is enabled.
 void setBufferResponse(boolean bufferResponse)
          trueif the reponse willk be buffered.
 void setBufferSize(int requestBufferSize)
          Set the request input buffer size
 void setClassLoader(ClassLoader classLoader)
          Set the ClassLoader used to load configurable classes (Pipeline, StreamAlgorithm).
 void setCompressableMimeTypes(String compressableMimeTypes)
           
 void setCompression(String compression)
           
 void setCompressionMinSize(int compressionMinSize)
           
 void setCurReadThread(int curReadThread)
           
 void setCurrentConnectionNumber(int currentConnectionNumber)
           
 void setDefaultResponseType(String defaultResponseType)
           
 void setDisableUploadTimeout(boolean isDisabled)
          Set the flag to control upload time-outs.
 void setDisplayConfiguration(boolean displayConfiguration)
           
 void setDomain(String domain)
           
 void setEnableAsyncExecution(boolean asyncExecution)
          Enable the AsyncHandler used when asynchronous
 void setEnableNioLogging(boolean enableNioLogging)
           
 void setFileCacheIsEnabled(boolean isFileCacheEnabled)
          Is the file caching mechanism enabled.
 void setForcedRequestType(String forcedRequestType)
           
 void setGlobalRequestProcessor(RequestGroupInfo globalRequestProcessor)
           
 void setGlobalRequestProcessorName(ObjectName globalRequestProcessorName)
           
 void setInet(InetAddress inet)
           
 void setInitialized(boolean initialized)
           
 void setIsMonitoringEnabled(boolean isMonitoringEnabled)
           
 void setIsWaiting(boolean isWaiting)
           
 void setKaTimeout(int kaTimeout)
           
 void setKeepAliveMbeanName(ObjectName keepAliveMbeanName)
           
 void setKeepAlivePipeline(KeepAlivePipeline keepAlivePipeline)
           
 void setKeepAliveStats(KeepAliveStats keepAliveStats)
           
 void setKeepAliveThreadCount(int threadCount)
          Sets the number of keep-alive threads.
 void setKeepAliveTimeoutInSeconds(int timeout)
          Sets the number of seconds before a keep-alive connection that has been idle times out and is closed.
 void setKeysToEnable(Queue<SelectionKey> keysToEnable)
           
 void setLargeFileCacheEnabled(boolean isLargeEnabled)
          Is the large file cache support enabled.
 void setLinger(int linger)
           
static void setLogger(Logger l)
          Set the logger used by this instance.
 void setManagement(Management jmxManagement)
           
 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 setMaxHttpHeaderSize(int maxHttpHeaderSize)
           
 void setMaxKeepAliveRequests(int mkar)
          Set the maximum number of Keep-Alive requests that we will honor.
 void setMaxLargeCacheSize(long mCacheSize)
          Set the maximum cache size
 void setMaxPostSize(int maxPostSize)
           
 void setMaxProcessorWorkerThreads(int maxProcessorWorkerThreads)
           
 void setMaxQueueSizeInBytes(int maxQueueSizeInBytes)
           
 void setMaxReadWorkerThreads(int maxReadWorkerThreads)
           
 void setMaxSelectors(int maxSelectors)
           
 void setMaxSmallCacheSize(long mCacheSize)
          Set the maximum cache size
 void setMaxSpareThreads(int maxThreads)
           
 void setMaxThreads(int maxThreads)
           
 void setMinEntrySize(long mSize)
          Set the maximum size a FileCacheEntry can have.
 void setMinProcessorQueueLength(int minProcessorQueueLength)
           
 void setMinReadQueueLength(int minReadQueueLength)
           
 void setMinSpareThreads(int minSpareThreads)
           
 void setMinThreads(int minWorkerThreads)
          The minimun threads created at startup.
 void setMinWorkerThreads(int minWorkerThreads)
           
 void setMserver(MBeanServer mserver)
           
 void setNextKeysExpiration(long nextKeysExpiration)
           
 void setNoCompressionUserAgents(String noCompressionUserAgents)
           
 void setOname(ObjectName oname)
           
 void setPipelineClassName(String pipelineClassName)
           
 void setPipelineStat(PipelineStatistic pipelineStat)
           
 void setPort(int port)
           
 void setProcessorPipeline(Pipeline processorPipeline)
           
 void setProcessorTasks(Queue<ProcessorTask> processorTasks)
           
 void setProcessorWorkerThreadName(ObjectName processorWorkerThreadName)
           
 void setPwcConnectionQueueMbeanName(ObjectName pwcConnectionQueueMbeanName)
           
 void setPwcFileCacheMbeanName(ObjectName pwcFileCacheMbeanName)
           
 void setReadPipeline(Pipeline readPipeline)
           
 void setReadTasks(Queue<ReadTask> readTasks)
           
 void setRecycleTasks(boolean recycleTasks)
           
 void setRestrictedUserAgents(String restrictedUserAgents)
           
 void setReuseAddress(boolean reuseAddress)
           
static void setRootFolder(String aRootFolder)
           
 void setRunning(boolean running)
           
 void setSecondsMaxAge(int sMaxAges)
          The timeout in seconds before remove a FileCacheEntry from the fileCache
 void setSelector(Selector selector)
           
 void setSelectorReadThreadsCount(int multiSelectorsCount)
           
static void setSelectorTimeout(int aSelectorTimeout)
           
 void setServerSocket(ServerSocket serverSocket)
           
 void setServerSocketChannel(ServerSocketChannel serverSocketChannel)
           
 void setServerSoTimeout(int i)
           
 void setServerTimeout(int timeout)
          Sets the timeout in ms of the server sockets created by this server.
 void setSocketKeepAlive(boolean socketKeepAlive)
           
protected  void setSocketOptions(Socket socket)
           
 void setSocketReceiveBufferSize(int socketReceiveBufferSize)
           
 void setSocketSendBufferSize(int socketSendBufferSize)
           
 void setSocketTimeout(int socketTimeout)
           
 void setSoLinger(int i)
           
 void setSoTimeout(int i)
           
 void setSsBackLog(int ssBackLog)
           
 void setTcpNoDelay(boolean b)
           
 void setThreadsIncrement(int threadsIncrement)
           
 void setThreadsTimeout(int threadsTimeout)
           
 void setTransactionTimeout(int transactionTimeout)
          Set the maximum time, in milliseconds, a WrokerThread processing an instance of this class.
 void setUploadTimeout(int uploadTimeout)
          Set the upload timeout.
 void setUseByteBufferView(boolean useByteBufferView)
           
 void setUseDirectByteBuffer(boolean useDirectByteBuffer)
           
static void setWebAppRootPath(String rf)
          Set the document root folder
 void startEndpoint()
          Start the Acceptor Thread and wait for incoming connection, in a non blocking mode.
protected  void startListener()
          Start a non blocking Selector object.
protected  void startPipelines()
          Starts the Pipeline used by this Selector
 void stopEndpoint()
           
protected  void stopPipelines()
          Stop the Pipeline used by this Selector
protected  void unregisterComponents()
          Unregister components.
 void wakeup()
          Wakes up the Selector associated with this thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SERVER_NAME

public static final String SERVER_NAME

serverTimeout

protected int serverTimeout

inet

protected InetAddress inet

port

protected int port

serverSocket

protected ServerSocket serverSocket

serverSocketChannel

protected ServerSocketChannel serverSocketChannel
The ServerSocketChannel used in blocking mode.


initialized

protected boolean initialized

running

protected volatile boolean running

domain

protected String domain

oname

protected ObjectName oname

globalRequestProcessorName

protected ObjectName globalRequestProcessorName

mserver

protected MBeanServer mserver

processorWorkerThreadName

protected ObjectName processorWorkerThreadName

tcpNoDelay

protected boolean tcpNoDelay

linger

protected int linger

socketTimeout

protected int socketTimeout

socketKeepAlive

protected boolean socketKeepAlive

maxKeepAliveRequests

protected int maxKeepAliveRequests

oOBInline

protected boolean oOBInline

socketReceiveBufferSize

protected int socketReceiveBufferSize

socketSendBufferSize

protected int socketSendBufferSize

compression

protected String compression
Compression value.


noCompressionUserAgents

protected String noCompressionUserAgents

restrictedUserAgents

protected String restrictedUserAgents

compressableMimeTypes

protected String compressableMimeTypes

compressionMinSize

protected int compressionMinSize

bufferResponse

protected boolean bufferResponse
Buffer the response until the buffer is full.


maxHttpHeaderSize

protected int maxHttpHeaderSize
Default HTTP header buffer size.


minReadQueueLength

protected int minReadQueueLength
Number of polled Read*Task instance.


minProcessorQueueLength

protected int minProcessorQueueLength
Number of polled ProcessorTask instance.


maxPostSize

protected int maxPostSize

selector

protected Selector selector
The Selector used by the connector.


adapter

protected Adapter adapter
Associated adapter.


readPipeline

protected Pipeline readPipeline
The queue shared by this thread and code>ReadTask


processorPipeline

protected Pipeline processorPipeline
The queue shared by this thread and the code>ProcessorTask.


pipelineStat

protected PipelineStatistic pipelineStat
Placeholder for Pipeline statistic.


pipelineClassName

protected String pipelineClassName
The default Pipeline used.


maxProcessorWorkerThreads

protected int maxProcessorWorkerThreads
Maximum number of WorkerThread


maxReadWorkerThreads

protected int maxReadWorkerThreads
Maximum number of ReadWorkerThread


minWorkerThreads

protected int minWorkerThreads
Minimum numbers of WorkerThread created


maxSelectors

protected int maxSelectors
Maximum number of Selectors in the SelectorFactory pool


minSpareThreads

protected int minSpareThreads
Minimum numbers of WorkerThread before creating new thread. Not used in 9.x


threadsIncrement

protected int threadsIncrement
The number used when increamenting the Pipeline thread pool.


threadsTimeout

protected int threadsTimeout
The timeout used by the thread when processing a request.


useDirectByteBuffer

protected boolean useDirectByteBuffer
Is the ByteBuffer used by the ReadTask use direct ByteBuffer or not.


globalRequestProcessor

protected RequestGroupInfo globalRequestProcessor
Monitoring object used to store information.


displayConfiguration

protected boolean displayConfiguration
If true, display the NIO configuration information.


isMonitoringEnabled

protected boolean isMonitoringEnabled
Is monitoring already started.


currentConnectionNumber

protected int currentConnectionNumber
The current number of simulatenous connection.


isWaiting

protected volatile boolean isWaiting
Is this Selector currently in Wating mode?


requestBufferSize

protected int requestBufferSize
The input request buffer size.


useByteBufferView

protected boolean useByteBufferView
Create view ByteBuffer from another ByteBuffer


keepAliveTimeoutInSeconds

protected int keepAliveTimeoutInSeconds

recycleTasks

protected boolean recycleTasks
Recycle the Task after running them


selectorTimeout

protected static int selectorTimeout
The Selector timeout value. By default, it is set to 60000 miliseconds (as in the j2se 1.5 ORB).


maxQueueSizeInBytes

protected int maxQueueSizeInBytes
Maximum pending connection before refusing requests.


algorithmClass

protected Class algorithmClass
The Algorithm used to predict the end of the NIO stream


algorithmClassName

protected String algorithmClassName
The Algorithm used to parse the NIO stream.


DEFAULT_ALGORITHM

public static final String DEFAULT_ALGORITHM
The default NIO stream algorithm.


ssBackLog

protected int ssBackLog
Server socket backlog.


defaultResponseType

protected String defaultResponseType
The default response-type


forcedRequestType

protected String forcedRequestType
The forced request-type


rootFolder

protected static String rootFolder
The root folder where application are deployed


processorTasks

protected Queue<ProcessorTask> processorTasks
ConcurrentLinkedQueue used as an object pool. If the list becomes empty, new ProcessorTask will be automatically added to the list.


readTasks

protected Queue<ReadTask> readTasks
ConcurrentLinkedQueue used as an object pool. If the list becomes empty, new ReadTask will be automatically added to the list.


activeProcessorTasks

protected Queue<ProcessorTask> activeProcessorTasks
List of active ProcessorTask.


multiSelectorsCount

protected int multiSelectorsCount
The number of SelectorReadThread


readThreads

protected MultiSelectorThread[] readThreads
The Selector used to register OP_READ


logger

protected static Logger logger
The logger used by the grizzly classes.


disableUploadTimeout

protected boolean disableUploadTimeout
Flag to disable setting a different time-out on uploads.


uploadTimeout

protected int uploadTimeout
Maximum timeout on uploads. 5 minutes as in Apache HTTPD server.


keepAlivePipeline

protected KeepAlivePipeline keepAlivePipeline
Keep-Alive subsystem. If a client opens a socket but never close it, the SelectionKey will stay forever in the Selector keys, and this will eventualy produce a memory leak.


fileCacheFactory

protected FileCacheFactory fileCacheFactory
The FileCacheFactory associated with this Selector


secondsMaxAge

protected int secondsMaxAge
Timeout before remove the static resource from the cache.


maxCacheEntries

protected int maxCacheEntries
The maximum entries in the fileCache


minEntrySize

protected long minEntrySize
The maximum size of a cached resources.


maxEntrySize

protected long maxEntrySize
The maximum size of a cached resources.


maxLargeFileCacheSize

protected long maxLargeFileCacheSize
The maximum cached bytes


maxSmallFileCacheSize

protected long maxSmallFileCacheSize
The maximum cached bytes


isFileCacheEnabled

protected boolean isFileCacheEnabled
Is the FileCache enabled.


isLargeFileCacheEnabled

protected boolean isLargeFileCacheEnabled
Is the large FileCache enabled.


asyncExecution

protected boolean asyncExecution
Is asynchronous mode enabled?


asyncHandler

protected AsyncHandler asyncHandler
When the asynchronous mode is enabled, the execution of this object will be delegated to the AsyncHandler


defaultAlgorithmInstalled

protected static boolean defaultAlgorithmInstalled
Is the DEFAULT_ALGORITHM used.


enableNioLogging

protected boolean enableNioLogging
Grizzly own debug flag.


bannedKeys

protected Queue<SelectionKey> bannedKeys
Banned SelectionKey registration.

Constructor Detail

SelectorThread

public SelectorThread()
Create the Selector object. Each instance of this class will listen to a specific port.

Method Detail

getSelector

public static final SelectorThread getSelector(int port)
Return the SelectorThread which listen on port, or null if there is no SelectorThread.


getSelectors

public static final Enumeration<SelectorThread> getSelectors()
Return an Enumeration of the active SelectorThreads


enableSelectionKeys

public void enableSelectionKeys()
Enable all registered interestOps. Due a a NIO bug, all interestOps invokation needs to occurs on the same thread as the selector thread.


addBannedSelectionKey

public void addBannedSelectionKey(SelectionKey key)
Add a SelectionKey to the banned list of SelectionKeys. A SelectionKey is banned when new registration aren't allowed on the Selector.


registerKey

public void registerKey(SelectionKey key)
Register a SelectionKey to this Selector running of this thread.


initEndpoint

public void initEndpoint()
                  throws IOException,
                         InstantiationException
initialized the endpoint by creating the ServerScoketChannel and by initializing the server socket.

Throws:
IOException
InstantiationException

newPipeline

protected Pipeline newPipeline(int maxThreads,
                               int minThreads,
                               String name,
                               int port,
                               int priority)
Create a new Pipeline instance using the pipelineClassName value.


initFileCacheFactory

protected void initFileCacheFactory()
Initialize the fileCacheFactory associated with this instance


enablePipelineStats

protected void enablePipelineStats()
Injects PipelineStatistic into every Pipeline, for monitoring purposes.


disablePipelineStats

protected void disablePipelineStats()
Removes PipelineStatistic from every Pipeline, when monitoring has been turned off.


initAlgorithm

protected void initAlgorithm()
Load using reflection the Algorithm class.


initKeepAlivePipeline

protected void initKeepAlivePipeline()
Initialize the keep-alive mechanism.


initPipeline

protected void initPipeline()
Init the Pipelines used by the WorkerThreads.


initReadTask

protected void initReadTask(int size)
Create a pool of ReadTask


newReadTask

protected ReadTask newReadTask()
Return a new ReadTask instance


initMultiSelectors

protected void initMultiSelectors()
                           throws IOException,
                                  InstantiationException
Initialize SelectorReadThread used to process OP_READ operations.

Throws:
IOException
InstantiationException

configureReadThread

protected void configureReadThread(SelectorThread multiSelector)
                            throws IOException,
                                   InstantiationException
Throws:
IOException
InstantiationException

initProcessorTask

protected void initProcessorTask(int size)
Create a pool of ProcessorTask


rampUpProcessorTask

protected void rampUpProcessorTask()
Initialize ProcessorTask


newProcessorTask

protected ProcessorTask newProcessorTask(boolean initialize)
Create ProcessorTask objects and configure it to be ready to proceed request.


configureProcessorTask

protected ProcessorTask configureProcessorTask(DefaultProcessorTask task)

reconfigureAsyncExecution

protected void reconfigureAsyncExecution()
Reconfigure Grizzly Asynchronous Request Processing(ARP) internal objects.


getProcessorTask

public ProcessorTask getProcessorTask()
Return a ProcessorTask from the pool. If the pool is empty, create a new instance.


getReadTask

public ReadTask getReadTask(SelectionKey key)
                     throws IOException
Return a ReadTask from the pool. If the pool is empty, create a new instance.

Throws:
IOException

run

public void run()
Start the endpoint (this)

Specified by:
run in interface Runnable
Overrides:
run in class Thread

startEndpoint

public void startEndpoint()
                   throws IOException,
                          InstantiationException
Start the Acceptor Thread and wait for incoming connection, in a non blocking mode.

Throws:
IOException
InstantiationException

startPipelines

protected void startPipelines()
Starts the Pipeline used by this Selector


stopPipelines

protected void stopPipelines()
Stop the Pipeline used by this Selector


startListener

protected void startListener()
Start a non blocking Selector object.


resetSpinCounter

public void resetSpinCounter()

getSpinRate

public int getSpinRate()

doSelect

protected void doSelect()
Execute a Selector.select() operation.


expireIdleKeys

protected void expireIdleKeys()
Cancel keep-alive connections.


handleConnection

protected void handleConnection(SelectionKey key)
                         throws IOException,
                                InterruptedException
Handle an incoming operation on the channel. It is always an ACCEPT or a READ.

Throws:
IOException
InterruptedException

handleAccept

protected void handleAccept(SelectionKey key)
                     throws IOException
Handle OP_ACCEPT

Throws:
IOException

handleRead

protected ReadTask handleRead(SelectionKey key)
                       throws IOException
Handle OP_READ

Throws:
IOException

cancelKey

public void cancelKey(SelectionKey key)
Cancel the current SelectionKey


returnTask

public void returnTask(Task task)
Returns the Task object to the pool.


wakeup

public void wakeup()
Wakes up the Selector associated with this thread.


clearTasks

protected void clearTasks()
Clear all cached Tasks


cancelThreadExecution

public boolean cancelThreadExecution(long cancelThreadID)
Cancel the threadID execution. Return true if it is successful.

Parameters:
id - the thread name to cancel

stopEndpoint

public void stopEndpoint()

setMaxThreads

public void setMaxThreads(int maxThreads)

getMaxThreads

public int getMaxThreads()

setMaxSpareThreads

public void setMaxSpareThreads(int maxThreads)

getMaxSpareThreads

public int getMaxSpareThreads()

setMinSpareThreads

public void setMinSpareThreads(int minSpareThreads)

getMinSpareThreads

public int getMinSpareThreads()

getPort

public int getPort()
Returns:
port specified via setPort(int)

getPortLowLevel

public int getPortLowLevel()
Use the method to get the actual port which is different from the requested port in case port 0 was requested.

Returns:
port that the socket is bound to or -1 if there is not serverSocket associated with this SelectorThread

setPort

public void setPort(int port)

getAddress

public InetAddress getAddress()

setAddress

public void setAddress(InetAddress inet)

isRunning

public boolean isRunning()

getCurrentBusyProcessorThreads

public int getCurrentBusyProcessorThreads()
Provides the count of request threads that are currently being processed by the container

Returns:
The count of busy threads

setServerTimeout

public void setServerTimeout(int timeout)
Sets the timeout in ms of the server sockets created by this server. This method allows the developer to make servers more or less responsive to having their server sockets shut down.

By default this value is 1000ms.


getTcpNoDelay

public boolean getTcpNoDelay()

setTcpNoDelay

public void setTcpNoDelay(boolean b)

getSoLinger

public int getSoLinger()

setSoLinger

public void setSoLinger(int i)

getSoTimeout

public int getSoTimeout()

setSoTimeout

public void setSoTimeout(int i)

getServerSoTimeout

public int getServerSoTimeout()

setServerSoTimeout

public void setServerSoTimeout(int i)

getQueueSizeInBytes

public int getQueueSizeInBytes()
Get the maximum pending connection this Pipeline can handle.


getMaxKeepAliveRequests

public int getMaxKeepAliveRequests()

setMaxKeepAliveRequests

public void setMaxKeepAliveRequests(int mkar)
Set the maximum number of Keep-Alive requests that we will honor.


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

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

setKeepAliveThreadCount

public void setKeepAliveThreadCount(int threadCount)
Sets the number of keep-alive threads.

Parameters:
threadCount - Number of keep-alive threads

setAdapter

public void setAdapter(Adapter adapter)
Set the associated adapter.

Parameters:
adapter - the new adapter

getAdapter

public Adapter getAdapter()
Get the associated adapter.

Returns:
the associated adapter

setSocketOptions

protected void setSocketOptions(Socket socket)

getObjectName

public ObjectName getObjectName()

getDomain

public String getDomain()

preRegister

public ObjectName preRegister(MBeanServer server,
                              ObjectName name)
                       throws Exception
Specified by:
preRegister in interface MBeanRegistration
Throws:
Exception

postRegister

public void postRegister(Boolean registrationDone)
Specified by:
postRegister in interface MBeanRegistration

preDeregister

public void preDeregister()
                   throws Exception
Specified by:
preDeregister in interface MBeanRegistration
Throws:
Exception

postDeregister

public void postDeregister()
Specified by:
postDeregister in interface MBeanRegistration

registerComponents

protected void registerComponents()
Register JMX components.


unregisterComponents

protected void unregisterComponents()
Unregister components.


enableMonitoring

public void enableMonitoring()
Enable gathering of monitoring datas.


disableMonitoring

public void disableMonitoring()
Disable gathering of monitoring datas.


isMonitoringEnabled

public boolean isMonitoringEnabled()
Returns true if monitoring has been enabled, false otherwise.


getRequestGroupInfo

public RequestGroupInfo getRequestGroupInfo()

getKeepAliveStats

public KeepAliveStats getKeepAliveStats()

initMonitoringLevel

protected void initMonitoringLevel()

getMaxHttpHeaderSize

public int getMaxHttpHeaderSize()

setMaxHttpHeaderSize

public void setMaxHttpHeaderSize(int maxHttpHeaderSize)

setMinThreads

public void setMinThreads(int minWorkerThreads)
The minimun threads created at startup.


setBufferSize

public void setBufferSize(int requestBufferSize)
Set the request input buffer size


getBufferSize

public int getBufferSize()
Return the request input buffer size


getSelector

public Selector getSelector()

getCountThreadsStats

public int getCountThreadsStats()
PWCThreadPool Stats


getCountThreadsIdleStats

public int getCountThreadsIdleStats()

getCurrentThreadCountStats

public int getCurrentThreadCountStats()
HTTPListener Stats


getCurrentThreadsBusyStats

public int getCurrentThreadsBusyStats()

getMaxSpareThreadsStats

public int getMaxSpareThreadsStats()

getMinSpareThreadsStats

public int getMinSpareThreadsStats()

getMaxThreadsStats

public int getMaxThreadsStats()

removeCacheEntry

public void removeCacheEntry(String contextPath)
Remove a context path from the FileCache.


setSecondsMaxAge

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


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.


setFileCacheIsEnabled

public void setFileCacheIsEnabled(boolean isFileCacheEnabled)
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.


setEnableAsyncExecution

public void setEnableAsyncExecution(boolean asyncExecution)
Enable the AsyncHandler used when asynchronous


getEnableAsyncExecution

public boolean getEnableAsyncExecution()
Return true when asynchronous execution is enabled.


setAsyncHandler

public void setAsyncHandler(AsyncHandler asyncHandler)
Set the AsyncHandler used when asynchronous execution is enabled.


getAsyncHandler

public AsyncHandler getAsyncHandler()
Return the AsyncHandler used when asynchronous execution is enabled.


setLogger

public static void setLogger(Logger l)
Set the logger used by this instance.


logger

public static Logger logger()
Return the logger used by the Grizzly classes.


setWebAppRootPath

public static void setWebAppRootPath(String rf)
Set the document root folder


getWebAppRootPath

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


getMaxReadWorkerThreads

public int getMaxReadWorkerThreads()

getReadPipeline

public Pipeline getReadPipeline()
Return the Pipeline used to handle OP_READ.


configureCompression

protected void configureCompression(DefaultProcessorTask processorTask)

getBufferResponse

public boolean getBufferResponse()
Return true if the reponse is buffered.


setBufferResponse

public void setBufferResponse(boolean bufferResponse)
trueif the reponse willk be buffered.


enableCometSupport

public void enableCometSupport(boolean enableComet)
Enable Comet/Poll request support.


enableRcmSupport

public void enableRcmSupport(boolean rcmSupport)
Enable Application Resource Allocation Grizzly Extension.


getServerTimeout

public int getServerTimeout()

getInet

public InetAddress getInet()

setInet

public void setInet(InetAddress inet)

getServerSocket

public ServerSocket getServerSocket()

setServerSocket

public void setServerSocket(ServerSocket serverSocket)

getServerSocketChannel

public ServerSocketChannel getServerSocketChannel()

setServerSocketChannel

public void setServerSocketChannel(ServerSocketChannel serverSocketChannel)

isInitialized

public boolean isInitialized()

setInitialized

public void setInitialized(boolean initialized)

setRunning

public void setRunning(boolean running)

setDomain

public void setDomain(String domain)

getOname

public ObjectName getOname()

setOname

public void setOname(ObjectName oname)

getGlobalRequestProcessorName

public ObjectName getGlobalRequestProcessorName()

setGlobalRequestProcessorName

public void setGlobalRequestProcessorName(ObjectName globalRequestProcessorName)

getKeepAliveMbeanName

public ObjectName getKeepAliveMbeanName()

setKeepAliveMbeanName

public void setKeepAliveMbeanName(ObjectName keepAliveMbeanName)

getPwcConnectionQueueMbeanName

public ObjectName getPwcConnectionQueueMbeanName()

setPwcConnectionQueueMbeanName

public void setPwcConnectionQueueMbeanName(ObjectName pwcConnectionQueueMbeanName)

getPwcFileCacheMbeanName

public ObjectName getPwcFileCacheMbeanName()

setPwcFileCacheMbeanName

public void setPwcFileCacheMbeanName(ObjectName pwcFileCacheMbeanName)

getMserver

public MBeanServer getMserver()

setMserver

public void setMserver(MBeanServer mserver)

getProcessorWorkerThreadName

public ObjectName getProcessorWorkerThreadName()

setProcessorWorkerThreadName

public void setProcessorWorkerThreadName(ObjectName processorWorkerThreadName)

isTcpNoDelay

public boolean isTcpNoDelay()

getLinger

public int getLinger()

setLinger

public void setLinger(int linger)

isSocketKeepAlive

public boolean isSocketKeepAlive()

setSocketKeepAlive

public void setSocketKeepAlive(boolean socketKeepAlive)

getSocketTimeout

public int getSocketTimeout()

setSocketTimeout

public void setSocketTimeout(int socketTimeout)

getSocketReceiveBufferSize

public int getSocketReceiveBufferSize()

setSocketReceiveBufferSize

public void setSocketReceiveBufferSize(int socketReceiveBufferSize)

getSocketSendBufferSize

public int getSocketSendBufferSize()

setSocketSendBufferSize

public void setSocketSendBufferSize(int socketSendBufferSize)

getCompression

public String getCompression()

setCompression

public void setCompression(String compression)

getNoCompressionUserAgents

public String getNoCompressionUserAgents()

setNoCompressionUserAgents

public void setNoCompressionUserAgents(String noCompressionUserAgents)

getRestrictedUserAgents

public String getRestrictedUserAgents()

setRestrictedUserAgents

public void setRestrictedUserAgents(String restrictedUserAgents)

getCompressableMimeTypes

public String getCompressableMimeTypes()

setCompressableMimeTypes

public void setCompressableMimeTypes(String compressableMimeTypes)

getCompressionMinSize

public int getCompressionMinSize()

setCompressionMinSize

public void setCompressionMinSize(int compressionMinSize)

isBufferResponse

public boolean isBufferResponse()

getMinReadQueueLength

public int getMinReadQueueLength()

setMinReadQueueLength

public void setMinReadQueueLength(int minReadQueueLength)

getMinProcessorQueueLength

public int getMinProcessorQueueLength()

setMinProcessorQueueLength

public void setMinProcessorQueueLength(int minProcessorQueueLength)

setSelector

public void setSelector(Selector selector)

getSelectorReadThreadsCount

public int getSelectorReadThreadsCount()

setSelectorReadThreadsCount

public void setSelectorReadThreadsCount(int multiSelectorsCount)

setReadPipeline

public void setReadPipeline(Pipeline readPipeline)

getProcessorPipeline

public Pipeline getProcessorPipeline()

setProcessorPipeline

public void setProcessorPipeline(Pipeline processorPipeline)

getPipelineStat

public PipelineStatistic getPipelineStat()

setPipelineStat

public void setPipelineStat(PipelineStatistic pipelineStat)

getPipelineClassName

public String getPipelineClassName()

setPipelineClassName

public void setPipelineClassName(String pipelineClassName)

getMaxSelectors

public int getMaxSelectors()

setMaxSelectors

public void setMaxSelectors(int maxSelectors)

getMaxProcessorWorkerThreads

public int getMaxProcessorWorkerThreads()

setMaxProcessorWorkerThreads

public void setMaxProcessorWorkerThreads(int maxProcessorWorkerThreads)

setMaxReadWorkerThreads

public void setMaxReadWorkerThreads(int maxReadWorkerThreads)

getMinWorkerThreads

public int getMinWorkerThreads()

setMinWorkerThreads

public void setMinWorkerThreads(int minWorkerThreads)

getThreadsIncrement

public int getThreadsIncrement()

setThreadsIncrement

public void setThreadsIncrement(int threadsIncrement)

getThreadsTimeout

public int getThreadsTimeout()

setThreadsTimeout

public void setThreadsTimeout(int threadsTimeout)

isUseDirectByteBuffer

public boolean isUseDirectByteBuffer()

setUseDirectByteBuffer

public void setUseDirectByteBuffer(boolean useDirectByteBuffer)

getGlobalRequestProcessor

public RequestGroupInfo getGlobalRequestProcessor()

setGlobalRequestProcessor

public void setGlobalRequestProcessor(RequestGroupInfo globalRequestProcessor)

setKeepAliveStats

public void setKeepAliveStats(KeepAliveStats keepAliveStats)

isDisplayConfiguration

public boolean isDisplayConfiguration()

setDisplayConfiguration

public void setDisplayConfiguration(boolean displayConfiguration)

isIsMonitoringEnabled

public boolean isIsMonitoringEnabled()

setIsMonitoringEnabled

public void setIsMonitoringEnabled(boolean isMonitoringEnabled)

getCurrentConnectionNumber

public int getCurrentConnectionNumber()

setCurrentConnectionNumber

public void setCurrentConnectionNumber(int currentConnectionNumber)

setIsWaiting

public void setIsWaiting(boolean isWaiting)

isUseByteBufferView

public boolean isUseByteBufferView()

setUseByteBufferView

public void setUseByteBufferView(boolean useByteBufferView)

getKaTimeout

public int getKaTimeout()

setKaTimeout

public void setKaTimeout(int kaTimeout)

isRecycleTasks

public boolean isRecycleTasks()

setRecycleTasks

public void setRecycleTasks(boolean recycleTasks)

getSelectorTimeout

public static int getSelectorTimeout()

setSelectorTimeout

public static void setSelectorTimeout(int aSelectorTimeout)

getMaxQueueSizeInBytes

public int getMaxQueueSizeInBytes()

setMaxQueueSizeInBytes

public void setMaxQueueSizeInBytes(int maxQueueSizeInBytes)

getAlgorithmClass

public Class getAlgorithmClass()

setAlgorithmClass

public void setAlgorithmClass(Class algorithmClass)

getAlgorithmClassName

public String getAlgorithmClassName()

setAlgorithmClassName

public void setAlgorithmClassName(String algorithmClassName)

getSsBackLog

public int getSsBackLog()

setSsBackLog

public void setSsBackLog(int ssBackLog)

getNextKeysExpiration

public long getNextKeysExpiration()

setNextKeysExpiration

public void setNextKeysExpiration(long nextKeysExpiration)

getDefaultResponseType

public String getDefaultResponseType()

setDefaultResponseType

public void setDefaultResponseType(String defaultResponseType)

getForcedRequestType

public String getForcedRequestType()

setForcedRequestType

public void setForcedRequestType(String forcedRequestType)

getRootFolder

public static String getRootFolder()

setRootFolder

public static void setRootFolder(String aRootFolder)

getKeysToEnable

public Queue<SelectionKey> getKeysToEnable()

setKeysToEnable

public void setKeysToEnable(Queue<SelectionKey> keysToEnable)

getProcessorTasks

public Queue<ProcessorTask> getProcessorTasks()

setProcessorTasks

public void setProcessorTasks(Queue<ProcessorTask> processorTasks)

getReadTasks

public Queue<ReadTask> getReadTasks()

setReadTasks

public void setReadTasks(Queue<ReadTask> readTasks)

getActiveProcessorTasks

public Queue<ProcessorTask> getActiveProcessorTasks()

setActiveProcessorTasks

public void setActiveProcessorTasks(Queue<ProcessorTask> activeProcessorTasks)

getCurReadThread

public int getCurReadThread()

setCurReadThread

public void setCurReadThread(int curReadThread)

getLogger

public static Logger getLogger()

getManagement

public Management getManagement()

setManagement

public void setManagement(Management jmxManagement)

getClassLoader

public ClassLoader getClassLoader()

setClassLoader

public void setClassLoader(ClassLoader classLoader)
Set the ClassLoader used to load configurable classes (Pipeline, StreamAlgorithm).


isEnableNioLogging

public boolean isEnableNioLogging()

setEnableNioLogging

public void setEnableNioLogging(boolean enableNioLogging)

getMaxPostSize

public int getMaxPostSize()

setMaxPostSize

public void setMaxPostSize(int maxPostSize)

setReuseAddress

public void setReuseAddress(boolean reuseAddress)

getReuseAddress

public boolean getReuseAddress()

getKeepAlivePipeline

public KeepAlivePipeline getKeepAlivePipeline()

setKeepAlivePipeline

public void setKeepAlivePipeline(KeepAlivePipeline keepAlivePipeline)

setDisableUploadTimeout

public void setDisableUploadTimeout(boolean isDisabled)
Set the flag to control upload time-outs.


getDisableUploadTimeout

public boolean getDisableUploadTimeout()
Get the flag that controls upload time-outs.


setUploadTimeout

public void setUploadTimeout(int uploadTimeout)
Set the upload timeout.


getTimeout

public int getTimeout()
Get the upload timeout.


getTransactionTimeout

public int getTransactionTimeout()
Set the maximum time, in milliseconds, a WorkerThread executing an instance of this class can execute.

Returns:
the maximum time, in milliseconds

setTransactionTimeout

public void setTransactionTimeout(int transactionTimeout)
Set the maximum time, in milliseconds, a WrokerThread processing an instance of this class.

Parameters:
transactionTimeout - the maximum time, in milliseconds.


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.