public class SslConnection extends AbstractConnection implements AsyncConnection
SSLEngine.
The connector uses an AsyncEndPoint (like SelectChannelEndPoint) as
it's source/sink of encrypted data. It then provides getSslEndPoint() to
expose a source/sink of unencrypted data to another connection (eg HttpConnection).
| Modifier and Type | Class and Description |
|---|---|
class |
SslConnection.SslEndPoint |
_endp| Constructor and Description |
|---|
SslConnection(SSLEngine engine,
EndPoint endp) |
SslConnection(SSLEngine engine,
EndPoint endp,
long timeStamp) |
| Modifier and Type | Method and Description |
|---|---|
AsyncEndPoint |
getSslEndPoint() |
Connection |
handle()
Handle the connection.
|
boolean |
isAllowRenegotiate() |
boolean |
isIdle() |
boolean |
isSuspended()
The semantic of this method is to return true to indicate interest in further reads,
or false otherwise, but it is misnamed and should be really called
isReadInterested(). |
protected SslConnection.SslEndPoint |
newSslEndPoint() |
void |
onClose()
Called after the connection is closed
|
void |
onIdleExpired(long idleForMs)
Called when the connection idle timeout expires
|
void |
onInputShutdown() |
void |
setAllowRenegotiate(boolean allowRenegotiate)
Set if SSL re-negotiation is allowed.
|
String |
toString() |
getEndPoint, getTimeStampclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTimeStampprotected SslConnection.SslEndPoint newSslEndPoint()
public boolean isAllowRenegotiate()
public void setAllowRenegotiate(boolean allowRenegotiate)
allowRenegotiate - true if re-negotiation is allowed (default false)public Connection handle() throws IOException
Connectionhandle in interface ConnectionIOException - if the handling of I/O operations failpublic boolean isIdle()
isIdle in interface ConnectionConnection.onIdleExpired(long)public boolean isSuspended()
ConnectionThe semantic of this method is to return true to indicate interest in further reads,
or false otherwise, but it is misnamed and should be really called isReadInterested().
isSuspended in interface Connectionpublic void onClose()
ConnectiononClose in interface Connectionpublic void onIdleExpired(long idleForMs)
ConnectiononIdleExpired in interface ConnectiononIdleExpired in class AbstractConnectionidleForMs - how long the connection has been idleConnection.isIdle()public void onInputShutdown()
throws IOException
onInputShutdown in interface AsyncConnectionIOExceptionpublic AsyncEndPoint getSslEndPoint()
public String toString()
toString in class AbstractConnectionCopyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.