|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.grizzly.filter.SSLReadFilter
public class SSLReadFilter
Simple ProtocolFilter implementation which execute an SSL handshake and decrypt the bytes, the pass the control to the next filter.
| Field Summary | |
|---|---|
protected int |
inputBBSize
Encrypted ByteBuffer default size. |
protected SSLContext |
sslContext
The SSLContext associated with the SSL implementation
we are running on. |
| Fields inherited from interface com.sun.grizzly.ProtocolFilter |
|---|
SUCCESSFUL_READ |
| Constructor Summary | |
|---|---|
SSLReadFilter()
|
|
| Method Summary | |
|---|---|
void |
configure(SSLConfig sslConfig)
Configures SSL settings. |
static Object[] |
doPeerCertificateChain(SelectionKey key,
boolean needClientAuth)
Get the peer certificate list by initiating a new handshake. |
boolean |
execute(Context ctx)
Execute a unit of processing work to be performed. |
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. |
SSLContext |
getSSLContext()
Return the SSLContext required to support SSL over NIO. |
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 static void |
log(String msg,
Throwable t)
Log a message/exception. |
protected SSLEngine |
newSSLEngine()
Return a new configured SSLEngine |
protected SSLEngine |
obtainSSLEngine(SelectionKey key)
Configure and return an instance of SSLEngine |
boolean |
postExecute(Context ctx)
If no bytes were available, close the connection by cancelling the SelectionKey. |
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 |
setSSLContext(SSLContext sslContext)
Set the SSLContext required to support SSL over NIO. |
void |
setWantClientAuth(boolean wantClientAuth)
Configures the engine to request client authentication. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SSLContext sslContext
SSLContext associated with the SSL implementation
we are running on.
protected int inputBBSize
| Constructor Detail |
|---|
public SSLReadFilter()
| Method Detail |
|---|
public boolean execute(Context ctx)
throws IOException
ProtocolFilter
execute in interface ProtocolFilterctx - Context
IOException
public boolean postExecute(Context ctx)
throws IOException
postExecute in interface ProtocolFilterctx - Context
IOException
public static Object[] doPeerCertificateChain(SelectionKey key,
boolean needClientAuth)
throws IOException
key - SelectionKeyneedClientAuth -
IOExceptionprotected SSLEngine newSSLEngine()
SSLEngine
SSLEngineprotected SSLEngine obtainSSLEngine(SelectionKey key)
key - a SelectionKey
SSLEnginepublic void configure(SSLConfig sslConfig)
SSLConfig contains all the parameters
required to buildSSLEngine. There will be no need to call
four methods: setSSLContext, setClientMode, setWantClientAuth,
setNeedClientAuth.
sslConfig - SSLConfig configurationpublic void setSSLContext(SSLContext sslContext)
sslContext - SSLContextpublic SSLContext getSSLContext()
SSLContextpublic String[] getEnabledCipherSuites()
SSLEngine
is initialized.
SSLEngine's default.'public void setEnabledCipherSuites(String[] enabledCipherSuites)
SSLEngine
is initialized.
enabledCipherSuites - public String[] getEnabledProtocols()
SSLEngine
is initialized.
SSLEngine's default.'public void setEnabledProtocols(String[] enabledProtocols)
SSLEngine
is initialized.
enabledProtocols - null means 'use SSLEngine's default.'public boolean isClientMode()
public void setClientMode(boolean clientMode)
clientMode - public boolean isNeedClientAuth()
public void setNeedClientAuth(boolean needClientAuth)
needClientAuth - public boolean isWantClientAuth()
public void setWantClientAuth(boolean wantClientAuth)
wantClientAuth -
protected static void log(String msg,
Throwable t)
msg - Stringt - Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||