|
||||||||||
| 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 |
|---|
| Fields inherited from class org.eclipse.jetty.io.nio.ChannelEndPoint |
|---|
_channel, _gather2, _local, _remote, _socket |
| Constructor Summary | |
|---|---|
SelectChannelEndPoint(java.nio.channels.SocketChannel channel,
SelectorManager.SelectSet selectSet,
java.nio.channels.SelectionKey key)
|
|
| Method Summary | |
|---|---|
boolean |
blockReadable(long timeoutMs)
|
boolean |
blockWritable(long timeoutMs)
|
void |
cancelIdle()
Cancel a call to the idle timeout |
void |
close()
Close any backing stream associated with the buffer |
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()
|
java.nio.channels.SelectionKey |
getSelectionKey()
|
SelectorManager |
getSelectManager()
|
SelectorManager.SelectSet |
getSelectSet()
|
Timeout.Task |
getTimeoutTask()
|
protected void |
idleExpired()
|
boolean |
isReadyForDispatch()
|
void |
run()
|
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 |
setWritable(boolean writable)
Set the writable status. |
java.lang.String |
toString()
|
| Methods inherited from class org.eclipse.jetty.io.nio.ChannelEndPoint |
|---|
fill, flush, getChannel, getLocalAddr, getLocalHost, getLocalPort, getRemoteAddr, getRemoteHost, getRemotePort, getTransport, isBlocking, isBufferingInput, isBufferingOutput, isBufferred, isOpen |
| 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, getRemoteAddr, getRemoteHost, getRemotePort, getTransport, isBlocking, isBufferingInput, isBufferingOutput, isBufferred, isOpen |
| Constructor Detail |
|---|
public SelectChannelEndPoint(java.nio.channels.SocketChannel channel,
SelectorManager.SelectSet selectSet,
java.nio.channels.SelectionKey key)
| Method Detail |
|---|
public java.nio.channels.SelectionKey getSelectionKey()
public SelectorManager getSelectManager()
public Connection getConnection()
getConnection in interface ConnectedEndPointpublic void setConnection(Connection connection)
setConnection in interface ConnectedEndPointpublic void schedule()
public void dispatch()
AsyncEndPoint
dispatch in interface AsyncEndPointpublic void scheduleIdle()
AsyncEndPoint
scheduleIdle in interface AsyncEndPointpublic void cancelIdle()
AsyncEndPoint
cancelIdle in interface AsyncEndPointprotected void idleExpired()
public int flush(Buffer header,
Buffer buffer,
Buffer trailer)
throws java.io.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.
java.io.IOException
public int flush(Buffer buffer)
throws java.io.IOException
EndPoint
flush in interface EndPointflush in class ChannelEndPointbuffer - The buffer to flush. This buffers getIndex is updated.
java.io.IOExceptionpublic boolean isReadyForDispatch()
isReadyForDispatch in interface AsyncEndPoint
public boolean blockReadable(long timeoutMs)
throws java.io.IOException
blockReadable in interface EndPointblockReadable in class ChannelEndPointjava.io.IOException
public boolean blockWritable(long timeoutMs)
throws java.io.IOException
blockWritable in interface EndPointblockWritable in class ChannelEndPointjava.io.IOExceptionpublic void setWritable(boolean writable)
AsyncEndPoint
setWritable in interface AsyncEndPointwritable - true if the endpoint is known to be writable or false
if it is known to not be writable.public void scheduleWrite()
AsyncEndPoint
scheduleWrite in interface AsyncEndPointpublic void run()
run in interface java.lang.Runnable
public void close()
throws java.io.IOException
EndPoint
close in interface EndPointclose in class ChannelEndPointjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic Timeout.Task getTimeoutTask()
public SelectorManager.SelectSet getSelectSet()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||