public class SslConnectionImpl extends Object implements Connection
Connection
providing SSL wrapping of another Connection
.Constructor and Description |
---|
SslConnectionImpl(SslConnectionHandler connectionHandler,
Connection wrappedConnection)
Initiate.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Flags to close the
WriteBufferReceiver . |
WriteBuffer |
createWriteBuffer(byte[] data,
int length)
Creates a
WriteBuffer for the data. |
WriteBuffer |
createWriteBuffer(ByteBuffer buffer)
Creates the
WriteBuffer for the ByteBuffer . |
InetSocketAddress |
getLocalAddress()
Obtains the local address for the
Connection . |
Object |
getLock()
Obtains the lock to
synchronize for using this
WriteBufferReceiver . |
InetSocketAddress |
getRemoteAddress()
Obtains the remote address for the
Connection . |
boolean |
isClosed()
Indicates if the
WriteBufferReceiver is closed. |
boolean |
isSecure()
Indicates if the connection is over a secure channel (e.g.
|
void |
writeData(WriteBuffer[] data)
Writes data to client of this
Connection . |
public SslConnectionImpl(SslConnectionHandler connectionHandler, Connection wrappedConnection)
connectionHandler
- SslConnectionHandler
.wrappedConnection
- Wrapped Connection
.public Object getLock()
WriteBufferReceiver
synchronize
for using this
WriteBufferReceiver
.getLock
in interface WriteBufferReceiver
WriteBufferReceiver
.public InetSocketAddress getLocalAddress()
Connection
Connection
.getLocalAddress
in interface Connection
InetSocketAddress
describing the local Socket
for
the Connection
.public InetSocketAddress getRemoteAddress()
Connection
Connection
.getRemoteAddress
in interface Connection
InetSocketAddress
describing the remote Socket
for the Connection
.public boolean isSecure()
Connection
isSecure
in interface Connection
true
if connection is over a secure channel.public WriteBuffer createWriteBuffer(byte[] data, int length)
WriteBufferReceiver
WriteBuffer
for the data.createWriteBuffer
in interface WriteBufferReceiver
data
- Data.length
- Length of data.WriteBuffer
.public WriteBuffer createWriteBuffer(ByteBuffer buffer)
WriteBufferReceiver
WriteBuffer
for the ByteBuffer
.createWriteBuffer
in interface WriteBufferReceiver
buffer
- ByteBuffer
.WriteBuffer
.public void writeData(WriteBuffer[] data)
WriteBufferReceiver
Connection
.writeData
in interface WriteBufferReceiver
data
- Data to be written.public void close()
WriteBufferReceiver
Flags to close the WriteBufferReceiver
.
Close occurs after all data has been written.
close
in interface WriteBufferReceiver
public boolean isClosed()
WriteBufferReceiver
WriteBufferReceiver
is closed.isClosed
in interface WriteBufferReceiver
true
if the WriteBufferReceiver
is closed.Copyright © 2005–2016. All rights reserved.