public class SslProtocolCodec extends Object implements WrappingProtocolCodec, SecuredSession
Modifier and Type | Class and Description |
---|---|
static class |
SslProtocolCodec.ClientAuth |
class |
SslProtocolCodec.SSLReadChannel |
class |
SslProtocolCodec.SSLWriteChannel |
ProtocolCodec.BufferState
Constructor and Description |
---|
SslProtocolCodec() |
Modifier and Type | Method and Description |
---|---|
SslProtocolCodec |
client() |
ProtocolCodec.BufferState |
flush()
Attempts to complete the previous write which did not complete.
|
boolean |
full()
Is the codec's buffer full?
|
long |
getLastReadSize() |
long |
getLastWriteSize() |
ProtocolCodec |
getNext() |
X509Certificate[] |
getPeerX509Certificates()
Gets the X509Certificate associated withe the peer.
|
int |
getReadBufferSize() |
long |
getReadCounter() |
SSLSession |
getSSLSession() |
int |
getWriteBufferSize() |
long |
getWriteCounter() |
void |
handshake() |
protected void |
initializeEngine() |
Object |
read()
Non-blocking channel based decoding.
|
SslProtocolCodec |
server(SslProtocolCodec.ClientAuth clientAuth) |
void |
setNext(ProtocolCodec next) |
void |
setSSLContext(SSLContext ctx) |
void |
setTransport(Transport transport) |
protected boolean |
transportFlush() |
void |
unread(byte[] buffer)
Pushes back a buffer as being unread.
|
ProtocolCodec.BufferState |
write(Object value)
Non-blocking channel based encoding.
|
public SslProtocolCodec()
public ProtocolCodec getNext()
getNext
in interface WrappingProtocolCodec
public void setNext(ProtocolCodec next)
setNext
in interface WrappingProtocolCodec
public void setSSLContext(SSLContext ctx)
public SslProtocolCodec client() throws Exception
Exception
public SslProtocolCodec server(SslProtocolCodec.ClientAuth clientAuth) throws Exception
Exception
protected void initializeEngine() throws Exception
Exception
public SSLSession getSSLSession()
public X509Certificate[] getPeerX509Certificates()
SecuredSession
getPeerX509Certificates
in interface SecuredSession
public void setTransport(Transport transport)
setTransport
in interface ProtocolCodec
public void handshake() throws IOException
IOException
protected boolean transportFlush() throws IOException
IOException
public void unread(byte[] buffer)
ProtocolCodec
unread
in interface ProtocolCodec
public Object read() throws IOException
ProtocolCodec
read
in interface ProtocolCodec
IOException
public ProtocolCodec.BufferState write(Object value) throws IOException
ProtocolCodec
write
in interface ProtocolCodec
IOException
public ProtocolCodec.BufferState flush() throws IOException
ProtocolCodec
flush
in interface ProtocolCodec
IOException
public boolean full()
ProtocolCodec
full
in interface ProtocolCodec
public long getWriteCounter()
getWriteCounter
in interface ProtocolCodec
public long getLastWriteSize()
getLastWriteSize
in interface ProtocolCodec
public long getReadCounter()
getReadCounter
in interface ProtocolCodec
public long getLastReadSize()
getLastReadSize
in interface ProtocolCodec
public int getReadBufferSize()
getReadBufferSize
in interface ProtocolCodec
public int getWriteBufferSize()
getWriteBufferSize
in interface ProtocolCodec
Copyright © 2010–2017 FuseSource, Corp.. All rights reserved.