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, getTimeStamp
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTimeStamp
protected 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
Connection
handle
in interface Connection
IOException
- if the handling of I/O operations failpublic boolean isIdle()
isIdle
in interface Connection
Connection.onIdleExpired(long)
public boolean isSuspended()
Connection
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()
.
isSuspended
in interface Connection
public void onClose()
Connection
onClose
in interface Connection
public void onIdleExpired(long idleForMs)
Connection
onIdleExpired
in interface Connection
onIdleExpired
in class AbstractConnection
idleForMs
- how long the connection has been idleConnection.isIdle()
public void onInputShutdown() throws IOException
onInputShutdown
in interface AsyncConnection
IOException
public AsyncEndPoint getSslEndPoint()
public String toString()
toString
in class AbstractConnection
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.