public class SslConnection.SslEndPoint extends java.lang.Object implements AsyncEndPoint
| Constructor and Description |
|---|
SslConnection.SslEndPoint() |
| Modifier and Type | Method and Description |
|---|---|
void |
asyncDispatch()
Dispatch the endpoint.
|
boolean |
blockReadable(long millisecs) |
boolean |
blockWritable(long millisecs) |
void |
cancelTimeout(Timeout.Task task) |
void |
close()
Close any backing stream associated with the endpoint
|
void |
dispatch()
Dispatch the endpoint if it is not already dispatched
|
int |
fill(Buffer buffer)
Fill the buffer from the current putIndex to it's capacity from whatever
byte source is backing the buffer.
|
void |
flush()
Flush any buffered output.
|
int |
flush(Buffer buffer)
Flush the buffer from the current getIndex to it's putIndex using whatever byte
sink is backing the buffer.
|
int |
flush(Buffer header,
Buffer buffer,
Buffer trailer)
Flush the buffer from the current getIndex to it's putIndex using whatever byte
sink is backing the buffer.
|
Connection |
getConnection() |
AsyncEndPoint |
getEndpoint() |
java.lang.String |
getLocalAddr() |
java.lang.String |
getLocalHost() |
int |
getLocalPort() |
int |
getMaxIdleTime()
Get the max idle time in ms.
|
java.lang.String |
getRemoteAddr() |
java.lang.String |
getRemoteHost() |
int |
getRemotePort() |
javax.net.ssl.SSLEngine |
getSslEngine() |
java.lang.Object |
getTransport() |
boolean |
hasProgressed() |
boolean |
isBlocking() |
boolean |
isCheckForIdle()
Get if the endpoint should be checked for idleness
|
boolean |
isInputShutdown() |
boolean |
isOpen() |
boolean |
isOutputShutdown() |
boolean |
isWritable() |
void |
onIdleExpired(long idleForMs)
Callback when idle.
|
void |
scheduleTimeout(Timeout.Task task,
long timeoutMs) |
void |
scheduleWrite()
Schedule a write dispatch.
|
void |
setCheckForIdle(boolean check)
Set if the endpoint should be checked for idleness
|
void |
setConnection(Connection connection) |
void |
setMaxIdleTime(int timeMs)
Set the max idle time.
|
void |
shutdownInput()
Shutdown any backing input stream associated with the endpoint
|
void |
shutdownOutput()
Shutdown any backing output stream associated with the endpoint
|
java.lang.String |
toString() |
public javax.net.ssl.SSLEngine getSslEngine()
public AsyncEndPoint getEndpoint()
public void shutdownOutput()
throws java.io.IOException
EndPointshutdownOutput in interface EndPointjava.io.IOExceptionpublic boolean isOutputShutdown()
isOutputShutdown in interface EndPointpublic void shutdownInput()
throws java.io.IOException
EndPointshutdownInput in interface EndPointjava.io.IOExceptionpublic boolean isInputShutdown()
isInputShutdown in interface EndPointpublic void close()
throws java.io.IOException
EndPointpublic int fill(Buffer buffer) throws java.io.IOException
EndPointfill in interface EndPointint value indicating the number of bytes
filled or -1 if EOF is reached.EofException - If input is shutdown or the endpoint is closed.java.io.IOExceptionpublic int flush(Buffer buffer) throws java.io.IOException
EndPointflush in interface EndPointbuffer - The buffer to flush. This buffers getIndex is updated.EofException - If the endpoint is closed or output is shutdown.java.io.IOExceptionpublic int flush(Buffer header, Buffer buffer, Buffer trailer) throws java.io.IOException
EndPointflush in interface EndPointheader - A buffer to write before flushing this buffer. This buffers getIndex is updated.buffer - The buffer to flush. This buffers getIndex is updated.trailer - A buffer to write after flushing this buffer. This buffers getIndex is updated.java.io.IOExceptionpublic boolean blockReadable(long millisecs)
throws java.io.IOException
blockReadable in interface EndPointjava.io.IOExceptionpublic boolean blockWritable(long millisecs)
throws java.io.IOException
blockWritable in interface EndPointjava.io.IOExceptionpublic java.lang.Object getTransport()
getTransport in interface EndPointpublic void flush()
throws java.io.IOException
EndPointflush in interface EndPointEofException - If the endpoint is closed or output is shutdown.java.io.IOExceptionpublic void dispatch()
AsyncEndPointdispatch in interface AsyncEndPointpublic void asyncDispatch()
AsyncEndPointasyncDispatch in interface AsyncEndPointpublic void scheduleWrite()
AsyncEndPointscheduleWrite in interface AsyncEndPointpublic void onIdleExpired(long idleForMs)
AsyncEndPointAn endpoint is idle if there has been no IO activity for
EndPoint.getMaxIdleTime() and AsyncEndPoint.isCheckForIdle() is true.
onIdleExpired in interface AsyncEndPointidleForMs - TODOpublic void setCheckForIdle(boolean check)
AsyncEndPointsetCheckForIdle in interface AsyncEndPointpublic boolean isCheckForIdle()
AsyncEndPointisCheckForIdle in interface AsyncEndPointpublic void scheduleTimeout(Timeout.Task task, long timeoutMs)
scheduleTimeout in interface AsyncEndPointpublic void cancelTimeout(Timeout.Task task)
cancelTimeout in interface AsyncEndPointpublic boolean isWritable()
isWritable in interface AsyncEndPointpublic boolean hasProgressed()
hasProgressed in interface AsyncEndPointAsyncEndPoint.hasProgressed()public java.lang.String getLocalAddr()
getLocalAddr in interface EndPointEndPoint is bound, or null
if this EndPoint does not represent a network connection.public java.lang.String getLocalHost()
getLocalHost in interface EndPointEndPoint is bound, or null
if this EndPoint does not represent a network connection.public int getLocalPort()
getLocalPort in interface EndPointEndPoint is listening, or 0
if this EndPoint does not represent a network connection.public java.lang.String getRemoteAddr()
getRemoteAddr in interface EndPointEndPoint is connected, or null
if this EndPoint does not represent a network connection.public java.lang.String getRemoteHost()
getRemoteHost in interface EndPointEndPoint is connected, or null
if this EndPoint does not represent a network connection.public int getRemotePort()
getRemotePort in interface EndPointEndPoint is connected, or 0
if this EndPoint does not represent a network connection.public boolean isBlocking()
isBlocking in interface EndPointpublic int getMaxIdleTime()
EndPointThe max idle time is the time the endpoint can be idle before
extraordinary handling takes place. This loosely corresponds to
the Socket.getSoTimeout() for blocking connections,
but AsyncEndPoint implementations must use other mechanisms
to implement the max idle time.
getMaxIdleTime in interface EndPointpublic void setMaxIdleTime(int timeMs)
throws java.io.IOException
EndPointsetMaxIdleTime in interface EndPointtimeMs - the max idle time in MS. Timeout <= 0 implies an infinite timeoutjava.io.IOException - if the timeout cannot be set.public Connection getConnection()
getConnection in interface ConnectedEndPointpublic void setConnection(Connection connection)
setConnection in interface ConnectedEndPointpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2013 FuseSource, Corp.. All Rights Reserved.