org.eclipse.jetty.io.nio
类 SslConnection.SslEndPoint

java.lang.Object
  继承者 org.eclipse.jetty.io.nio.SslConnection.SslEndPoint
所有已实现的接口:
AsyncEndPoint, ConnectedEndPoint, EndPoint
包容类:
SslConnection

public class SslConnection.SslEndPoint
extends Object
implements AsyncEndPoint


构造方法摘要
SslConnection.SslEndPoint()
           
 
方法摘要
 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()
           
 String getLocalAddr()
           
 String getLocalHost()
           
 int getLocalPort()
           
 int getMaxIdleTime()
          Get the max idle time in ms.
 String getRemoteAddr()
           
 String getRemoteHost()
           
 int getRemotePort()
           
 SSLEngine getSslEngine()
           
 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
 String toString()
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

SslConnection.SslEndPoint

public SslConnection.SslEndPoint()
方法详细信息

getSslEngine

public SSLEngine getSslEngine()

getEndpoint

public AsyncEndPoint getEndpoint()

shutdownOutput

public void shutdownOutput()
                    throws IOException
从接口 EndPoint 复制的描述
Shutdown any backing output stream associated with the endpoint

指定者:
接口 EndPoint 中的 shutdownOutput
抛出:
IOException

isOutputShutdown

public boolean isOutputShutdown()
指定者:
接口 EndPoint 中的 isOutputShutdown

shutdownInput

public void shutdownInput()
                   throws IOException
从接口 EndPoint 复制的描述
Shutdown any backing input stream associated with the endpoint

指定者:
接口 EndPoint 中的 shutdownInput
抛出:
IOException

isInputShutdown

public boolean isInputShutdown()
指定者:
接口 EndPoint 中的 isInputShutdown

close

public void close()
           throws IOException
从接口 EndPoint 复制的描述
Close any backing stream associated with the endpoint

指定者:
接口 EndPoint 中的 close
抛出:
IOException

fill

public int fill(Buffer buffer)
         throws IOException
从接口 EndPoint 复制的描述
Fill the buffer from the current putIndex to it's capacity from whatever byte source is backing the buffer. The putIndex is increased if bytes filled. The buffer may chose to do a compact before filling.

指定者:
接口 EndPoint 中的 fill
返回:
an int value indicating the number of bytes filled or -1 if EOF is reached.
抛出:
EofException - If input is shutdown or the endpoint is closed.
IOException

flush

public int flush(Buffer buffer)
          throws IOException
从接口 EndPoint 复制的描述
Flush the buffer from the current getIndex to it's putIndex using whatever byte sink is backing the buffer. The getIndex is updated with the number of bytes flushed. Any mark set is cleared. If the entire contents of the buffer are flushed, then an implicit empty() is done.

指定者:
接口 EndPoint 中的 flush
参数:
buffer - The buffer to flush. This buffers getIndex is updated.
返回:
the number of bytes written
抛出:
EofException - If the endpoint is closed or output is shutdown.
IOException

flush

public int flush(Buffer header,
                 Buffer buffer,
                 Buffer trailer)
          throws IOException
从接口 EndPoint 复制的描述
Flush the buffer from the current getIndex to it's putIndex using whatever byte sink is backing the buffer. The getIndex is updated with the number of bytes flushed. Any mark set is cleared. If the entire contents of the buffer are flushed, then an implicit empty() is done. The passed header/trailer buffers are written before/after the contents of this buffer. This may be done either as gather writes, as a poke into this buffer or as several writes. The implementation is free to select the optimal mechanism.

指定者:
接口 EndPoint 中的 flush
参数:
header - 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.
返回:
the total number of bytes written.
抛出:
IOException

blockReadable

public boolean blockReadable(long millisecs)
                      throws IOException
指定者:
接口 EndPoint 中的 blockReadable
抛出:
IOException

blockWritable

public boolean blockWritable(long millisecs)
                      throws IOException
指定者:
接口 EndPoint 中的 blockWritable
抛出:
IOException

isOpen

public boolean isOpen()
指定者:
接口 EndPoint 中的 isOpen

getTransport

public Object getTransport()
指定者:
接口 EndPoint 中的 getTransport
返回:
The underlying transport object (socket, channel, etc.)

flush

public void flush()
           throws IOException
从接口 EndPoint 复制的描述
Flush any buffered output. May fail to write all data if endpoint is non-blocking

指定者:
接口 EndPoint 中的 flush
抛出:
EofException - If the endpoint is closed or output is shutdown.
IOException

dispatch

public void dispatch()
从接口 AsyncEndPoint 复制的描述
Dispatch the endpoint if it is not already dispatched

指定者:
接口 AsyncEndPoint 中的 dispatch

asyncDispatch

public void asyncDispatch()
从接口 AsyncEndPoint 复制的描述
Dispatch the endpoint. If it is already dispatched, schedule a redispatch

指定者:
接口 AsyncEndPoint 中的 asyncDispatch

scheduleWrite

public void scheduleWrite()
从接口 AsyncEndPoint 复制的描述
Schedule a write dispatch. Set the endpoint to not be writable and schedule a dispatch when it becomes writable.

指定者:
接口 AsyncEndPoint 中的 scheduleWrite

onIdleExpired

public void onIdleExpired(long idleForMs)
从接口 AsyncEndPoint 复制的描述
Callback when idle.

An endpoint is idle if there has been no IO activity for EndPoint.getMaxIdleTime() and AsyncEndPoint.isCheckForIdle() is true.

指定者:
接口 AsyncEndPoint 中的 onIdleExpired
参数:
idleForMs - TODO

setCheckForIdle

public void setCheckForIdle(boolean check)
从接口 AsyncEndPoint 复制的描述
Set if the endpoint should be checked for idleness

指定者:
接口 AsyncEndPoint 中的 setCheckForIdle

isCheckForIdle

public boolean isCheckForIdle()
从接口 AsyncEndPoint 复制的描述
Get if the endpoint should be checked for idleness

指定者:
接口 AsyncEndPoint 中的 isCheckForIdle

scheduleTimeout

public void scheduleTimeout(Timeout.Task task,
                            long timeoutMs)
指定者:
接口 AsyncEndPoint 中的 scheduleTimeout

cancelTimeout

public void cancelTimeout(Timeout.Task task)
指定者:
接口 AsyncEndPoint 中的 cancelTimeout

isWritable

public boolean isWritable()
指定者:
接口 AsyncEndPoint 中的 isWritable

hasProgressed

public boolean hasProgressed()
指定者:
接口 AsyncEndPoint 中的 hasProgressed
返回:
True if IO has been successfully performed since the last call to AsyncEndPoint.hasProgressed()

getLocalAddr

public String getLocalAddr()
指定者:
接口 EndPoint 中的 getLocalAddr
返回:
The local IP address to which this EndPoint is bound, or null if this EndPoint does not represent a network connection.

getLocalHost

public String getLocalHost()
指定者:
接口 EndPoint 中的 getLocalHost
返回:
The local host name to which this EndPoint is bound, or null if this EndPoint does not represent a network connection.

getLocalPort

public int getLocalPort()
指定者:
接口 EndPoint 中的 getLocalPort
返回:
The local port number on which this EndPoint is listening, or 0 if this EndPoint does not represent a network connection.

getRemoteAddr

public String getRemoteAddr()
指定者:
接口 EndPoint 中的 getRemoteAddr
返回:
The remote IP address to which this EndPoint is connected, or null if this EndPoint does not represent a network connection.

getRemoteHost

public String getRemoteHost()
指定者:
接口 EndPoint 中的 getRemoteHost
返回:
The host name of the remote machine to which this EndPoint is connected, or null if this EndPoint does not represent a network connection.

getRemotePort

public int getRemotePort()
指定者:
接口 EndPoint 中的 getRemotePort
返回:
The remote port number to which this EndPoint is connected, or 0 if this EndPoint does not represent a network connection.

isBlocking

public boolean isBlocking()
指定者:
接口 EndPoint 中的 isBlocking

getMaxIdleTime

public int getMaxIdleTime()
从接口 EndPoint 复制的描述
Get the max idle time in ms.

The 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.

指定者:
接口 EndPoint 中的 getMaxIdleTime
返回:
the max idle time in ms or if ms <= 0 implies an infinite timeout

setMaxIdleTime

public void setMaxIdleTime(int timeMs)
                    throws IOException
从接口 EndPoint 复制的描述
Set the max idle time.

指定者:
接口 EndPoint 中的 setMaxIdleTime
参数:
timeMs - the max idle time in MS. Timeout <= 0 implies an infinite timeout
抛出:
IOException - if the timeout cannot be set.

getConnection

public Connection getConnection()
指定者:
接口 ConnectedEndPoint 中的 getConnection

setConnection

public void setConnection(Connection connection)
指定者:
接口 ConnectedEndPoint 中的 setConnection

toString

public String toString()
覆盖:
Object 中的 toString


Copyright © 2013. All Rights Reserved.