|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jetty.io.nio.ChannelEndPoint
org.eclipse.jetty.io.nio.SelectChannelEndPoint
public class SelectChannelEndPoint
An Endpoint that can be scheduled by SelectorManager.
| 字段摘要 | |
|---|---|
static Logger |
LOG
|
| 从类 org.eclipse.jetty.io.nio.ChannelEndPoint 继承的字段 |
|---|
_channel, _gather2, _local, _maxIdleTime, _remote, _socket |
| 构造方法摘要 | |
|---|---|
SelectChannelEndPoint(SocketChannel channel,
SelectorManager.SelectSet selectSet,
SelectionKey key,
int maxIdleTime)
|
|
| 方法摘要 | |
|---|---|
void |
asyncDispatch()
Dispatch the endpoint. |
boolean |
blockReadable(long timeoutMs)
|
boolean |
blockWritable(long timeoutMs)
|
void |
cancelTimeout(Timeout.Task task)
|
void |
checkIdleTimestamp(long now)
|
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. |
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()
|
long |
getIdleTimestamp()
|
SelectionKey |
getSelectionKey()
|
SelectorManager |
getSelectManager()
|
SelectorManager.SelectSet |
getSelectSet()
|
protected void |
handle()
|
boolean |
hasProgressed()
|
boolean |
isCheckForIdle()
Get if the endpoint should be checked for idleness |
boolean |
isWritable()
|
protected void |
notIdle()
|
void |
onIdleExpired(long idleForMs)
Callback when idle. |
void |
schedule()
Called by selectSet to schedule handling |
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)
Don't set the SoTimeout |
String |
toString()
|
protected boolean |
undispatch()
Called when a dispatched thread is no longer handling the endpoint. |
| 从类 org.eclipse.jetty.io.nio.ChannelEndPoint 继承的方法 |
|---|
flush, gatheringFlush, getChannel, getLocalAddr, getLocalHost, getLocalPort, getMaxIdleTime, getRemoteAddr, getRemoteHost, getRemotePort, getTransport, isBlocking, isInputShutdown, isOpen, isOutputShutdown, shutdownChannelInput, shutdownChannelOutput, shutdownInput, shutdownOutput |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 从接口 org.eclipse.jetty.io.EndPoint 继承的方法 |
|---|
flush, getLocalAddr, getLocalHost, getLocalPort, getMaxIdleTime, getRemoteAddr, getRemoteHost, getRemotePort, getTransport, isBlocking, isInputShutdown, isOpen, isOutputShutdown, shutdownInput, shutdownOutput |
| 字段详细信息 |
|---|
public static final Logger LOG
| 构造方法详细信息 |
|---|
public SelectChannelEndPoint(SocketChannel channel,
SelectorManager.SelectSet selectSet,
SelectionKey key,
int maxIdleTime)
throws IOException
IOException| 方法详细信息 |
|---|
public SelectionKey getSelectionKey()
public SelectorManager getSelectManager()
public Connection getConnection()
ConnectedEndPoint 中的 getConnectionpublic void setConnection(Connection connection)
ConnectedEndPoint 中的 setConnectionpublic long getIdleTimestamp()
public void schedule()
public void asyncDispatch()
AsyncEndPoint 复制的描述
AsyncEndPoint 中的 asyncDispatchpublic void dispatch()
AsyncEndPoint 复制的描述
AsyncEndPoint 中的 dispatchprotected boolean undispatch()
public void cancelTimeout(Timeout.Task task)
AsyncEndPoint 中的 cancelTimeout
public void scheduleTimeout(Timeout.Task task,
long timeoutMs)
AsyncEndPoint 中的 scheduleTimeoutpublic void setCheckForIdle(boolean check)
AsyncEndPoint 复制的描述
AsyncEndPoint 中的 setCheckForIdlepublic boolean isCheckForIdle()
AsyncEndPoint 复制的描述
AsyncEndPoint 中的 isCheckForIdleprotected void notIdle()
public void checkIdleTimestamp(long now)
public void onIdleExpired(long idleForMs)
AsyncEndPoint 复制的描述An endpoint is idle if there has been no IO activity for
EndPoint.getMaxIdleTime() and AsyncEndPoint.isCheckForIdle() is true.
AsyncEndPoint 中的 onIdleExpiredidleForMs - TODO
public int fill(Buffer buffer)
throws IOException
EndPoint 复制的描述
EndPoint 中的 fillChannelEndPoint 中的 fillint value indicating the number of bytes
filled or -1 if EOF is reached.
EofException - If input is shutdown or the endpoint is closed.
IOException
public int flush(Buffer header,
Buffer buffer,
Buffer trailer)
throws IOException
EndPoint 复制的描述
EndPoint 中的 flushChannelEndPoint 中的 flushheader - 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.
IOException
public int flush(Buffer buffer)
throws IOException
EndPoint 复制的描述
EndPoint 中的 flushChannelEndPoint 中的 flushbuffer - The buffer to flush. This buffers getIndex is updated.
EofException - If the endpoint is closed or output is shutdown.
IOException
public boolean blockReadable(long timeoutMs)
throws IOException
EndPoint 中的 blockReadableChannelEndPoint 中的 blockReadableIOException
public boolean blockWritable(long timeoutMs)
throws IOException
EndPoint 中的 blockWritableChannelEndPoint 中的 blockWritableIOExceptionpublic void scheduleWrite()
AsyncEndPoint 复制的描述
AsyncEndPoint 中的 scheduleWriteAsyncEndPoint.scheduleWrite()public boolean isWritable()
AsyncEndPoint 中的 isWritablepublic boolean hasProgressed()
AsyncEndPoint 中的 hasProgressedAsyncEndPoint.hasProgressed()protected void handle()
public void close()
throws IOException
EndPoint 复制的描述
EndPoint 中的 closeChannelEndPoint 中的 closeIOExceptionpublic String toString()
Object 中的 toStringpublic SelectorManager.SelectSet getSelectSet()
public void setMaxIdleTime(int timeMs)
throws IOException
EndPoint 中的 setMaxIdleTimeChannelEndPoint 中的 setMaxIdleTimetimeMs - the max idle time in MS. Timeout <= 0 implies an infinite timeout
IOException - if the timeout cannot be set.ChannelEndPoint.setMaxIdleTime(int)
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||