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

java.lang.Object
  extended by java.lang.Thread
      extended by com.sun.enterprise.web.connector.grizzly.SelectorThread
          extended by com.sun.enterprise.web.connector.grizzly.SelectorReadThread
All Implemented Interfaces:
MultiSelectorThread, Runnable, MBeanRegistration

public class SelectorReadThread
extends SelectorThread
implements MultiSelectorThread

Specialized SelectorThread that only handle OP_READ.

Author:
Scott Oaks, Jean-Francois Arcand

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static int countName
          Int used to differenciate thsi instance
 
Fields inherited from class com.sun.enterprise.web.connector.grizzly.SelectorThread
activeProcessorTasks, adapter, algorithmClass, algorithmClassName, asyncExecution, asyncHandler, bannedKeys, bufferResponse, compressableMimeTypes, compression, compressionMinSize, currentConnectionNumber, DEFAULT_ALGORITHM, defaultAlgorithmInstalled, defaultResponseType, disableUploadTimeout, displayConfiguration, domain, enableNioLogging, fileCacheFactory, forcedRequestType, globalRequestProcessor, globalRequestProcessorName, inet, initialized, isFileCacheEnabled, isLargeFileCacheEnabled, isMonitoringEnabled, isWaiting, keepAlivePipeline, keepAliveTimeoutInSeconds, linger, logger, maxCacheEntries, maxEntrySize, maxHttpHeaderSize, maxKeepAliveRequests, maxLargeFileCacheSize, maxPostSize, maxProcessorWorkerThreads, maxQueueSizeInBytes, maxReadWorkerThreads, maxSelectors, maxSmallFileCacheSize, minEntrySize, minProcessorQueueLength, minReadQueueLength, minSpareThreads, minWorkerThreads, mserver, multiSelectorsCount, noCompressionUserAgents, oname, oOBInline, pipelineClassName, pipelineStat, port, processorPipeline, processorTasks, processorWorkerThreadName, readPipeline, readTasks, readThreads, recycleTasks, requestBufferSize, restrictedUserAgents, rootFolder, running, secondsMaxAge, selector, selectorTimeout, SERVER_NAME, serverSocket, serverSocketChannel, serverTimeout, socketKeepAlive, socketReceiveBufferSize, socketSendBufferSize, socketTimeout, ssBackLog, tcpNoDelay, threadsIncrement, threadsTimeout, uploadTimeout, useByteBufferView, useDirectByteBuffer
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SelectorReadThread()
           
 
Method Summary
 void addChannel(SocketChannel channel)
          Add a Channel to be processed by this Selector
 int getCurrentBusyProcessorThreads()
          Provides the count of request threads that are currently being processed by the container
 ReadTask getReadTask(SelectionKey key)
          Return a ReadTask configured to use this instance.
 void initEndpoint()
          Initialize this SelectorThread
 void startEndpoint()
          Start and wait for incoming connection
 
Methods inherited from class com.sun.enterprise.web.connector.grizzly.SelectorThread
addBannedSelectionKey, cancelKey, cancelThreadExecution, clearTasks, configureCompression, configureProcessorTask, configureReadThread, disableMonitoring, disablePipelineStats, doSelect, enableCometSupport, enableMonitoring, enablePipelineStats, enableRcmSupport, enableSelectionKeys, expireIdleKeys, getActiveProcessorTasks, getAdapter, getAddress, getAlgorithmClass, getAlgorithmClassName, getAsyncHandler, getBufferResponse, getBufferSize, getClassLoader, getCompressableMimeTypes, getCompression, getCompressionMinSize, getCountThreadsIdleStats, getCountThreadsStats, getCurReadThread, getCurrentConnectionNumber, getCurrentThreadCountStats, getCurrentThreadsBusyStats, getDefaultResponseType, getDisableUploadTimeout, getDomain, getEnableAsyncExecution, getForcedRequestType, getGlobalRequestProcessor, getGlobalRequestProcessorName, getInet, getKaTimeout, getKeepAliveMbeanName, getKeepAlivePipeline, getKeepAliveStats, getKeepAliveTimeoutInSeconds, getKeysToEnable, getLargeFileCacheEnabled, getLinger, getLogger, getManagement, getMaxCacheEntries, getMaxEntrySize, getMaxHttpHeaderSize, getMaxKeepAliveRequests, getMaxLargeCacheSize, getMaxPostSize, getMaxProcessorWorkerThreads, getMaxQueueSizeInBytes, getMaxReadWorkerThreads, getMaxSelectors, getMaxSmallCacheSize, getMaxSpareThreads, getMaxSpareThreadsStats, getMaxThreads, getMaxThreadsStats, getMinEntrySize, getMinProcessorQueueLength, getMinReadQueueLength, getMinSpareThreads, getMinSpareThreadsStats, getMinWorkerThreads, getMserver, getNextKeysExpiration, getNoCompressionUserAgents, getObjectName, getOname, getPipelineClassName, getPipelineStat, getPort, getPortLowLevel, getProcessorPipeline, getProcessorTask, getProcessorTasks, getProcessorWorkerThreadName, getPwcConnectionQueueMbeanName, getPwcFileCacheMbeanName, getQueueSizeInBytes, getReadPipeline, getReadTasks, getRequestGroupInfo, getRestrictedUserAgents, getReuseAddress, getRootFolder, getSelector, getSelector, getSelectorReadThreadsCount, getSelectors, getSelectorTimeout, getServerSocket, getServerSocketChannel, getServerSoTimeout, getServerTimeout, getSocketReceiveBufferSize, getSocketSendBufferSize, getSocketTimeout, getSoLinger, getSoTimeout, getSpinRate, getSsBackLog, getTcpNoDelay, getThreadsIncrement, getThreadsTimeout, getTimeout, getTransactionTimeout, getWebAppRootPath, handleAccept, handleConnection, handleRead, initAlgorithm, initFileCacheFactory, initKeepAlivePipeline, initMonitoringLevel, initMultiSelectors, initPipeline, initProcessorTask, initReadTask, isBufferResponse, isDisplayConfiguration, isEnableNioLogging, isFileCacheEnabled, isInitialized, isIsMonitoringEnabled, isMonitoringEnabled, isRecycleTasks, isRunning, isSocketKeepAlive, isTcpNoDelay, isUseByteBufferView, isUseDirectByteBuffer, logger, newPipeline, newProcessorTask, newReadTask, postDeregister, postRegister, preDeregister, preRegister, rampUpProcessorTask, reconfigureAsyncExecution, registerComponents, registerKey, removeCacheEntry, resetSpinCounter, returnTask, run, setActiveProcessorTasks, setAdapter, setAddress, setAlgorithmClass, setAlgorithmClassName, setAsyncHandler, setBufferResponse, setBufferSize, setClassLoader, setCompressableMimeTypes, setCompression, setCompressionMinSize, setCurReadThread, setCurrentConnectionNumber, setDefaultResponseType, setDisableUploadTimeout, setDisplayConfiguration, setDomain, setEnableAsyncExecution, setEnableNioLogging, setFileCacheIsEnabled, setForcedRequestType, setGlobalRequestProcessor, setGlobalRequestProcessorName, setInet, setInitialized, setIsMonitoringEnabled, setIsWaiting, setKaTimeout, setKeepAliveMbeanName, setKeepAlivePipeline, setKeepAliveStats, setKeepAliveThreadCount, setKeepAliveTimeoutInSeconds, setKeysToEnable, setLargeFileCacheEnabled, setLinger, setLogger, setManagement, setMaxCacheEntries, setMaxEntrySize, setMaxHttpHeaderSize, setMaxKeepAliveRequests, setMaxLargeCacheSize, setMaxPostSize, setMaxProcessorWorkerThreads, setMaxQueueSizeInBytes, setMaxReadWorkerThreads, setMaxSelectors, setMaxSmallCacheSize, setMaxSpareThreads, setMaxThreads, setMinEntrySize, setMinProcessorQueueLength, setMinReadQueueLength, setMinSpareThreads, setMinThreads, setMinWorkerThreads, setMserver, setNextKeysExpiration, setNoCompressionUserAgents, setOname, setPipelineClassName, setPipelineStat, setPort, setProcessorPipeline, setProcessorTasks, setProcessorWorkerThreadName, setPwcConnectionQueueMbeanName, setPwcFileCacheMbeanName, setReadPipeline, setReadTasks, setRecycleTasks, setRestrictedUserAgents, setReuseAddress, setRootFolder, setRunning, setSecondsMaxAge, setSelector, setSelectorReadThreadsCount, setSelectorTimeout, setServerSocket, setServerSocketChannel, setServerSoTimeout, setServerTimeout, setSocketKeepAlive, setSocketOptions, setSocketReceiveBufferSize, setSocketSendBufferSize, setSocketTimeout, setSoLinger, setSoTimeout, setSsBackLog, setTcpNoDelay, setThreadsIncrement, setThreadsTimeout, setTransactionTimeout, setUploadTimeout, setUseByteBufferView, setUseDirectByteBuffer, setWebAppRootPath, startListener, startPipelines, stopEndpoint, stopPipelines, unregisterComponents, wakeup
 
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
 
Methods inherited from interface com.sun.enterprise.web.connector.grizzly.MultiSelectorThread
stopEndpoint
 

Field Detail

countName

public static int countName
Int used to differenciate thsi instance

Constructor Detail

SelectorReadThread

public SelectorReadThread()
Method Detail

addChannel

public void addChannel(SocketChannel channel)
                throws IOException,
                       ClosedChannelException
Add a Channel to be processed by this Selector

Specified by:
addChannel in interface MultiSelectorThread
Throws:
IOException
ClosedChannelException

initEndpoint

public void initEndpoint()
                  throws IOException,
                         InstantiationException
Initialize this SelectorThread

Specified by:
initEndpoint in interface MultiSelectorThread
Overrides:
initEndpoint in class SelectorThread
Throws:
IOException
InstantiationException

startEndpoint

public void startEndpoint()
                   throws IOException,
                          InstantiationException
Start and wait for incoming connection

Specified by:
startEndpoint in interface MultiSelectorThread
Overrides:
startEndpoint in class SelectorThread
Throws:
IOException
InstantiationException

getReadTask

public ReadTask getReadTask(SelectionKey key)
                     throws IOException
Return a ReadTask configured to use this instance.

Overrides:
getReadTask in class SelectorThread
Throws:
IOException

getCurrentBusyProcessorThreads

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

Specified by:
getCurrentBusyProcessorThreads in interface MultiSelectorThread
Overrides:
getCurrentBusyProcessorThreads in class SelectorThread
Returns:
Count of requests


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