|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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.
| Field Summary | |
|---|---|
static Logger |
__log
|
| Fields inherited from class org.eclipse.jetty.io.nio.ChannelEndPoint |
|---|
_channel, _gather2, _local, _maxIdleTime, _remote, _socket |
| Constructor Summary | |
|---|---|
SelectChannelEndPoint(SocketChannel channel,
SelectorManager.SelectSet selectSet,
SelectionKey key)
|
|
SelectChannelEndPoint(SocketChannel channel,
SelectorManager.SelectSet selectSet,
SelectionKey key,
int maxIdleTime)
|
|
| Method Summary | |
|---|---|
boolean |
blockReadable(long timeoutMs)
|
boolean |
blockWritable(long timeoutMs)
|
void |
cancelIdle()
Cancel a call to the idle timeout |
void |
checkIdleTimestamp(long now)
|
void |
close()
Close any backing stream associated with the endpoint |
void |
dispatch()
Dispatch the endpoint to a thread to attend to it. |
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()
|
protected void |
idleExpired()
|
boolean |
isReadyForDispatch()
|
void |
schedule()
Called by selectSet to schedule handling |
void |
scheduleIdle()
Schedule a call to the idle timeout |
void |
scheduleWrite()
Schedule a write dispatch. |
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. |
| Methods inherited from class org.eclipse.jetty.io.nio.ChannelEndPoint |
|---|
fill, flush, gatheringFlush, getChannel, getLocalAddr, getLocalHost, getLocalPort, getMaxIdleTime, getRemoteAddr, getRemoteHost, getRemotePort, getTransport, isBlocking, isBufferingInput, isBufferingOutput, isBufferred, isInputShutdown, isOpen, isOutputShutdown, shutdownInput, shutdownOutput |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.jetty.io.EndPoint |
|---|
fill, flush, getLocalAddr, getLocalHost, getLocalPort, getMaxIdleTime, getRemoteAddr, getRemoteHost, getRemotePort, getTransport, isBlocking, isBufferingInput, isBufferingOutput, isBufferred, isInputShutdown, isOpen, isOutputShutdown, shutdownInput, shutdownOutput |
| Field Detail |
|---|
public static final Logger __log
| Constructor Detail |
|---|
public SelectChannelEndPoint(SocketChannel channel,
SelectorManager.SelectSet selectSet,
SelectionKey key,
int maxIdleTime)
throws IOException
IOException
public SelectChannelEndPoint(SocketChannel channel,
SelectorManager.SelectSet selectSet,
SelectionKey key)
throws IOException
IOException| Method Detail |
|---|
public SelectionKey getSelectionKey()
public SelectorManager getSelectManager()
public Connection getConnection()
getConnection in interface ConnectedEndPointpublic void setConnection(Connection connection)
setConnection in interface ConnectedEndPointpublic long getIdleTimestamp()
public void schedule()
public void dispatch()
AsyncEndPoint
dispatch in interface AsyncEndPointprotected boolean undispatch()
public void scheduleIdle()
AsyncEndPoint
scheduleIdle in interface AsyncEndPointpublic void cancelIdle()
AsyncEndPoint
cancelIdle in interface AsyncEndPointpublic void checkIdleTimestamp(long now)
protected void idleExpired()
public int flush(Buffer header,
Buffer buffer,
Buffer trailer)
throws IOException
EndPoint
flush in interface EndPointflush in class ChannelEndPointheader - 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
flush in interface EndPointflush in class ChannelEndPointbuffer - The buffer to flush. This buffers getIndex is updated.
IOExceptionpublic boolean isReadyForDispatch()
isReadyForDispatch in interface AsyncEndPoint
public boolean blockReadable(long timeoutMs)
throws IOException
blockReadable in interface EndPointblockReadable in class ChannelEndPointIOException
public boolean blockWritable(long timeoutMs)
throws IOException
blockWritable in interface EndPointblockWritable in class ChannelEndPointIOExceptionpublic void scheduleWrite()
AsyncEndPoint
scheduleWrite in interface AsyncEndPointprotected void handle()
public void close()
throws IOException
EndPoint
close in interface EndPointclose in class ChannelEndPointIOExceptionpublic String toString()
toString in class Objectpublic SelectorManager.SelectSet getSelectSet()
public void setMaxIdleTime(int timeMs)
throws IOException
setMaxIdleTime in interface EndPointsetMaxIdleTime in class ChannelEndPointtimeMs - the max idle time in MS. Timeout <= 0 implies an infinite timeout
IOException - if the timeout cannot be set.ChannelEndPoint.setMaxIdleTime(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||