| java.lang.Object org.apache.mina.filter.ssl.SslHandler
SslHandler | class SslHandler (Code) | | A helper class using the SSLEngine API to decrypt/encrypt data.
Each connection has a SSLEngine that is used through the lifetime of the connection.
We allocate buffers for use as the outbound and inbound network buffers.
These buffers handle all of the intermediary data for the SSL connection. To make things easy,
we'll require outNetBuffer be completely flushed before trying to wrap any more data.
author: The Apache MINA Project (dev@mina.apache.org) version: $Rev: 616100 $, $Date: 2008-01-28 15:58:32 -0700 (Mon, 28 Jan 2008) $ |
closeOutbound | public boolean closeOutbound() throws SSLException(Code) | | Start SSL shutdown process.
true if shutdown process is started.false if shutdown process is already finished. throws: SSLException - on errors |
copy | public static IoBuffer copy(ByteBuffer src)(Code) | | Creates a new MINA buffer that is a deep copy of the remaining bytes
in the given buffer (between index buf.position() and buf.limit())
Parameters: src - the buffer to copy the new buffer, ready to read from |
destroy | public void destroy()(Code) | | Release allocated buffers.
|
encrypt | public void encrypt(ByteBuffer src) throws SSLException(Code) | | Encrypt provided buffer. Encytpted data reurned by getOutNetBuffer().
Parameters: src - data to encrypt throws: SSLException - on errors |
fetchAppBuffer | public IoBuffer fetchAppBuffer()(Code) | | Get decrypted application data.
buffer with data |
fetchOutNetBuffer | public IoBuffer fetchOutNetBuffer()(Code) | | Get encrypted data to be sent.
buffer with data |
flushScheduledEvents | public void flushScheduledEvents()(Code) | | |
handshake | public void handshake(NextFilter nextFilter) throws SSLException(Code) | | Perform any handshaking processing.
|
isHandshakeComplete | public boolean isHandshakeComplete()(Code) | | Check if handshake is completed.
|
isInboundDone | public boolean isInboundDone()(Code) | | |
isOutboundDone | public boolean isOutboundDone()(Code) | | |
isWritingEncryptedData | public boolean isWritingEncryptedData()(Code) | | Check we are writing encrypted data.
|
messageReceived | public void messageReceived(NextFilter nextFilter, ByteBuffer buf) throws SSLException(Code) | | Call when data read from net. Will perform inial hanshake or decrypt provided
Buffer.
Decrytpted data reurned by getAppBuffer(), if any.
Parameters: buf - buffer to decrypt Parameters: nextFilter - Next filter in chain throws: SSLException - on errors |
needToCompleteHandshake | public boolean needToCompleteHandshake()(Code) | | Check if there is any need to complete handshake.
|
scheduleFilterWrite | public void scheduleFilterWrite(NextFilter nextFilter, WriteRequest writeRequest)(Code) | | |
scheduleMessageReceived | public void scheduleMessageReceived(NextFilter nextFilter, Object message)(Code) | | |
schedulePreHandshakeWriteRequest | public void schedulePreHandshakeWriteRequest(NextFilter nextFilter, WriteRequest writeRequest)(Code) | | |
|
|