|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.filterchain.BaseFilter
org.glassfish.grizzly.filterchain.AbstractCodecFilter<Buffer,Buffer>
org.glassfish.grizzly.ssl.SSLFilter
public class SSLFilter
SSL Filter to operate with SSL encrypted data.
| Nested Class Summary | |
|---|---|
static class |
SSLFilter.CertificateEvent
|
| Field Summary | |
|---|---|
protected int |
maxPendingBytes
|
| Constructor Summary | |
|---|---|
SSLFilter()
|
|
SSLFilter(SSLEngineConfigurator serverSSLEngineConfigurator,
SSLEngineConfigurator clientSSLEngineConfigurator)
Build SSLFilter with the given SSLEngineConfigurator. |
|
SSLFilter(SSLEngineConfigurator serverSSLEngineConfigurator,
SSLEngineConfigurator clientSSLEngineConfigurator,
boolean renegotiateOnClientAuthWant)
Build SSLFilter with the given SSLEngineConfigurator. |
|
| Method Summary | |
|---|---|
protected Buffer |
doHandshakeStep(javax.net.ssl.SSLEngine sslEngine,
FilterChainContext context)
|
int |
getMaxPendingBytesPerConnection()
|
protected java.lang.Object[] |
getPeerCertificateChain(javax.net.ssl.SSLEngine sslEngine,
FilterChainContext context,
boolean needClientAuth)
Obtains the certificate chain for this SSL session. |
NextAction |
handleEvent(FilterChainContext ctx,
FilterChainEvent event)
Handle custom event associated with the Connection. |
NextAction |
handleRead(FilterChainContext ctx)
Execute a unit of processing work to be performed, when channel will become available for reading. |
NextAction |
handleWrite(FilterChainContext ctx)
Execute a unit of processing work to be performed, when some data should be written on channel. |
void |
handshake(Connection connection,
CompletionHandler<javax.net.ssl.SSLEngine> completionHandler)
|
void |
handshake(Connection connection,
CompletionHandler<javax.net.ssl.SSLEngine> completionHandler,
java.lang.Object dstAddress)
|
void |
handshake(Connection connection,
CompletionHandler<javax.net.ssl.SSLEngine> completionHandler,
java.lang.Object dstAddress,
SSLEngineConfigurator sslEngineConfigurator)
|
protected void |
renegotiate(javax.net.ssl.SSLEngine sslEngine,
FilterChainContext context)
Performs an SSL renegotiation. |
void |
setMaxPendingBytesPerConnection(int maxPendingBytes)
Configures the maximum number of bytes that may be queued to be written for a particular Connection. |
| Methods inherited from class org.glassfish.grizzly.filterchain.AbstractCodecFilter |
|---|
getDecoder, getEncoder |
| Methods inherited from class org.glassfish.grizzly.filterchain.BaseFilter |
|---|
createContext, exceptionOccurred, getFilterChain, getIndex, handleAccept, handleClose, handleConnect, onAdded, onFilterChainChanged, onRemoved |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.glassfish.grizzly.filterchain.Filter |
|---|
exceptionOccurred, handleAccept, handleClose, handleConnect, onAdded, onFilterChainChanged, onRemoved |
| Field Detail |
|---|
protected volatile int maxPendingBytes
| Constructor Detail |
|---|
public SSLFilter()
public SSLFilter(SSLEngineConfigurator serverSSLEngineConfigurator,
SSLEngineConfigurator clientSSLEngineConfigurator)
SSLEngineConfigurator.
serverSSLEngineConfigurator - SSLEngine configurator for server side connectionsclientSSLEngineConfigurator - SSLEngine configurator for client side connections
public SSLFilter(SSLEngineConfigurator serverSSLEngineConfigurator,
SSLEngineConfigurator clientSSLEngineConfigurator,
boolean renegotiateOnClientAuthWant)
SSLEngineConfigurator.
serverSSLEngineConfigurator - SSLEngine configurator for server side connectionsclientSSLEngineConfigurator - SSLEngine configurator for client side connections| Method Detail |
|---|
public NextAction handleEvent(FilterChainContext ctx,
FilterChainEvent event)
throws java.io.IOException
BaseFilterConnection.
This Filter may either complete the required processing and
return StopAction, or delegate remaining processing to the next
Filter in a FilterChain containing this Filter
by returning InvokeAction.
handleEvent in interface FilterhandleEvent in class BaseFilterctx - FilterChainContext
NextAction instruction for FilterChain, how it
should continue the execution
java.io.IOException
public NextAction handleRead(FilterChainContext ctx)
throws java.io.IOException
BaseFilterFilter may either complete the required processing and
return false, or delegate remaining processing to the next
Filter in a FilterChain containing this Filter
by returning true.
handleRead in interface FilterhandleRead in class AbstractCodecFilter<Buffer,Buffer>ctx - FilterChainContext
NextAction instruction for FilterChain, how it
should continue the execution
java.io.IOException
public NextAction handleWrite(FilterChainContext ctx)
throws java.io.IOException
BaseFilterFilter may either complete the required processing and
return false, or delegate remaining processing to the next
Filter in a FilterChain containing this Filter
by returning true.
handleWrite in interface FilterhandleWrite in class AbstractCodecFilter<Buffer,Buffer>ctx - FilterChainContext
NextAction instruction for FilterChain, how it
should continue the execution
java.io.IOExceptionpublic int getMaxPendingBytesPerConnection()
Connection.
This value is related to the situation when we try to send application
data before SSL handshake completes, so the data should be stored and
sent on wire once handshake will be completed.public void setMaxPendingBytesPerConnection(int maxPendingBytes)
Connection.
This value is related to the situation when we try to send application
data before SSL handshake completes, so the data should be stored and
sent on wire once handshake will be completed.
maxPendingBytes - maximum number of bytes that may be queued to be
written for a particular Connection
public void handshake(Connection connection,
CompletionHandler<javax.net.ssl.SSLEngine> completionHandler)
throws java.io.IOException
java.io.IOException
public void handshake(Connection connection,
CompletionHandler<javax.net.ssl.SSLEngine> completionHandler,
java.lang.Object dstAddress)
throws java.io.IOException
java.io.IOException
public void handshake(Connection connection,
CompletionHandler<javax.net.ssl.SSLEngine> completionHandler,
java.lang.Object dstAddress,
SSLEngineConfigurator sslEngineConfigurator)
throws java.io.IOException
java.io.IOException
protected Buffer doHandshakeStep(javax.net.ssl.SSLEngine sslEngine,
FilterChainContext context)
throws java.io.IOException
java.io.IOException
protected void renegotiate(javax.net.ssl.SSLEngine sslEngine,
FilterChainContext context)
throws java.io.IOException
sslEngine - the SSLEngine associated with this
this renegotiation request.context - the FilterChainContext associated with this
this renegotiation request.
java.io.IOException - if an error occurs during SSL renegotiation.
protected java.lang.Object[] getPeerCertificateChain(javax.net.ssl.SSLEngine sslEngine,
FilterChainContext context,
boolean needClientAuth)
throws java.io.IOException
Obtains the certificate chain for this SSL session. If no certificates
are available, and needClientAuth is true, an SSL renegotiation
will be be triggered to request the certificates from the client.
sslEngine - the SSLEngine associated with this
certificate request.context - the FilterChainContext associated with this
this certificate request.needClientAuth - determines whether or not SSL renegotiation will
be attempted to obtain the certificate chain.
Object[]. If no
certificate chain can be determined, this method will return
null.
java.io.IOException - if an error occurs during renegotiation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||