|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
com.sun.enterprise.web.connector.grizzly.SelectorThread
com.sun.enterprise.web.connector.grizzly.ssl.SSLSelectorThread
public class SSLSelectorThread
SSL over NIO Selector implementation. Mainly, this class
replace the clear text implementation by defining the SSL tasks counterpart:
SSLReadTask, SSLProcessorTask and SSLByteBufferInputStream.
The SSLPipeline is the default and must not be replace unless all its
attribute properly implemented.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected SSLContext |
sslContext
The SSLContext associated with the SSL implementation
we are running on. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
SSLSelectorThread()
|
|
| Method Summary | |
|---|---|
void |
disableMonitoring()
Disable gathering of monitoring datas. |
void |
enableMonitoring()
Enable gathering of monitoring datas. |
void |
enableSelectionKeys()
Enable all registered interestOps. |
protected void |
expireIdleKeys()
Cancel keep-alive connections. |
String[] |
getEnabledCipherSuites()
Returns the list of cipher suites to be enabled when SSLEngine
is initialized. |
String[] |
getEnabledProtocols()
Returns the list of protocols to be enabled when SSLEngine
is initialized. |
ReadTask |
getReadTask(SelectionKey key)
Return a SSLReadTask from the pool. |
ServerSocketFactory |
getServerSocketFactory()
Return the ServerSocketFactory used when a blocking IO
is enabled. |
SSLContext |
getSSLContext()
Return the SSLContext required to support SSL over NIO. |
SSLImplementation |
getSSLImplementation()
Return the current SSLImplementation this Thread |
protected ReadTask |
handleRead(SelectionKey key)
Handle OP_READ |
protected void |
initFileCacheFactory()
Initialize the fileCacheFactory associated with this instance |
protected void |
initMultiSelectors()
Initialize SSLSelectorReadThread used to process
OP_READ operations. |
boolean |
isClientMode()
Returns true if the SSlEngine is set to use client mode when handshaking. |
boolean |
isNeedClientAuth()
Returns true if the SSLEngine will require client authentication. |
boolean |
isWantClientAuth()
Returns true if the engine will request client authentication. |
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 SSLProcessorTask objects and configure it to be ready
to proceed request. |
protected DefaultReadTask |
newReadTask()
Return a new SSLReadTask instance |
void |
registerKey(SelectionKey key)
Register a SelectionKey to this Selector
running of this thread. |
void |
setClientMode(boolean clientMode)
Configures the engine to use client (or server) mode when handshaking. |
void |
setEnabledCipherSuites(String[] enabledCipherSuites)
Sets the list of cipher suites to be enabled when SSLEngine
is initialized. |
void |
setEnabledProtocols(String[] enabledProtocols)
Sets the list of protocols to be enabled when SSLEngine
is initialized. |
void |
setNeedClientAuth(boolean needClientAuth)
Configures the engine to require client authentication. |
void |
setServerSocketFactory(ServerSocketFactory factory)
Set the ServerSocketFactory used when a blocking IO
is enabled. |
void |
setSSLContext(SSLContext sslContext)
Set the SSLContext required to support SSL over NIO. |
void |
setSSLImplementation(SSLImplementation sslImplementation)
Set the Coyote SSLImplementation. |
void |
setWantClientAuth(boolean wantClientAuth)
Configures the engine to request client authentication. |
| 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 |
|---|
protected SSLContext sslContext
SSLContext associated with the SSL implementation
we are running on.
| Constructor Detail |
|---|
public SSLSelectorThread()
| Method Detail |
|---|
protected void initMultiSelectors()
throws IOException,
InstantiationException
SSLSelectorReadThread used to process
OP_READ operations.
initMultiSelectors in class SelectorThreadIOException
InstantiationExceptionpublic void enableSelectionKeys()
enableSelectionKeys in class SelectorThread
protected ReadTask handleRead(SelectionKey key)
throws IOException
handleRead in class SelectorThreadIOExceptionprotected void expireIdleKeys()
expireIdleKeys in class SelectorThreadpublic void registerKey(SelectionKey key)
SelectionKey to this Selector
running of this thread.
registerKey in class SelectorThread
protected Pipeline newPipeline(int maxThreads,
int minThreads,
String name,
int port,
int priority)
Pipeline instance using the
pipelineClassName value.
newPipeline in class SelectorThread
public ReadTask getReadTask(SelectionKey key)
throws IOException
SSLReadTask from the pool. If the pool is empty,
create a new instance. Make sure the SSLEngine is reused when the
SelectionKey is part of a keep-alive transaction.
getReadTask in class SelectorThreadIOExceptionprotected DefaultReadTask newReadTask()
SSLReadTask instance
newReadTask in class SelectorThreadprotected ProcessorTask newProcessorTask(boolean initialize)
SSLProcessorTask objects and configure it to be ready
to proceed request.
newProcessorTask in class SelectorThreadpublic void setSSLContext(SSLContext sslContext)
public SSLContext getSSLContext()
public void setSSLImplementation(SSLImplementation sslImplementation)
setSSLImplementation in interface SecureSelector<SSLImplementation>public SSLImplementation getSSLImplementation()
SSLImplementation this Thread
public String[] getEnabledCipherSuites()
SSLEngine
is initialized.
getEnabledCipherSuites in interface SecureSelector<SSLImplementation>SSLEngine's default.'public void setEnabledCipherSuites(String[] enabledCipherSuites)
SSLEngine
is initialized.
setEnabledCipherSuites in interface SecureSelector<SSLImplementation>cipherSuites - null means 'use SSLEngine's default.'public String[] getEnabledProtocols()
SSLEngine
is initialized.
getEnabledProtocols in interface SecureSelector<SSLImplementation>SSLEngine's default.'public void setEnabledProtocols(String[] enabledProtocols)
SSLEngine
is initialized.
setEnabledProtocols in interface SecureSelector<SSLImplementation>protocols - null means 'use SSLEngine's default.'public boolean isClientMode()
isClientMode in interface SecureSelector<SSLImplementation>public void setClientMode(boolean clientMode)
setClientMode in interface SecureSelector<SSLImplementation>public boolean isNeedClientAuth()
isNeedClientAuth in interface SecureSelector<SSLImplementation>public void setNeedClientAuth(boolean needClientAuth)
setNeedClientAuth in interface SecureSelector<SSLImplementation>public boolean isWantClientAuth()
isWantClientAuth in interface SecureSelector<SSLImplementation>public void setWantClientAuth(boolean wantClientAuth)
setWantClientAuth in interface SecureSelector<SSLImplementation>protected void initFileCacheFactory()
initFileCacheFactory in class SelectorThreadpublic ServerSocketFactory getServerSocketFactory()
ServerSocketFactory used when a blocking IO
is enabled.
getServerSocketFactory in interface SecureSelector<SSLImplementation>public void setServerSocketFactory(ServerSocketFactory factory)
ServerSocketFactory used when a blocking IO
is enabled.
setServerSocketFactory in interface SecureSelector<SSLImplementation>public void enableMonitoring()
enableMonitoring in class SelectorThreadpublic void disableMonitoring()
disableMonitoring in class SelectorThread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||