|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mortbay.io.nio.ChannelEndPoint
org.mortbay.jetty.nio.SelectChannelConnector.HttpEndPoint
private class SelectChannelConnector.HttpEndPoint
| Nested Class Summary | |
|---|---|
private class |
SelectChannelConnector.HttpEndPoint.IdleTask
|
| Field Summary | |
|---|---|
(package private) HttpConnection |
_connection
|
(package private) boolean |
_dispatched
|
(package private) int |
_interestOps
|
(package private) SelectionKey |
_key
|
(package private) int |
_readBlocked
|
(package private) SelectChannelConnector.SelectSet |
_selectSet
|
(package private) SelectChannelConnector.HttpEndPoint.IdleTask |
_timeoutTask
|
(package private) boolean |
_writable
|
(package private) int |
_writeBlocked
|
| Constructor Summary | |
|---|---|
SelectChannelConnector.HttpEndPoint(SocketChannel channel,
SelectChannelConnector.SelectSet selectSet)
|
|
| Method Summary | |
|---|---|
void |
blockReadable(long timeoutMs)
|
void |
blockWritable(long timeoutMs)
|
void |
close()
Close any backing stream associated with the buffer |
(package private) void |
dispatch()
Dispatch the endpoint by arranging for a thread to service it. |
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. |
boolean |
isOpen()
|
void |
run()
|
(package private) void |
setKey(SelectionKey key)
|
String |
toString()
|
private void |
undispatch()
Called when a dispatched thread is no longer handling the endpoint. |
private void |
updateKey()
Updates selection key. |
| Methods inherited from class org.mortbay.io.nio.ChannelEndPoint |
|---|
getChannel, getConnection, getLocalAddr, getLocalHost, getLocalPort, getRemoteAddr, getRemoteHost, getRemotePort, isBlocking |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
SelectChannelConnector.SelectSet _selectSet
boolean _dispatched
boolean _writable
SelectionKey _key
HttpConnection _connection
int _interestOps
int _readBlocked
int _writeBlocked
SelectChannelConnector.HttpEndPoint.IdleTask _timeoutTask
| Constructor Detail |
|---|
SelectChannelConnector.HttpEndPoint(SocketChannel channel,
SelectChannelConnector.SelectSet selectSet)
| Method Detail |
|---|
void setKey(SelectionKey key)
void dispatch()
throws IOException
IOExceptionprivate void undispatch()
public int fill(Buffer buffer)
throws IOException
EndPoint
fill in interface EndPointfill in class ChannelEndPointint value indicating the number of bytes
filled or -1 if EOF is reached.
IOException
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 isOpen()
isOpen in interface EndPointisOpen in class ChannelEndPointpublic void blockReadable(long timeoutMs)
blockReadable in interface EndPointblockReadable in class ChannelEndPointpublic void blockWritable(long timeoutMs)
blockWritable in interface EndPointblockWritable in class ChannelEndPointprivate void updateKey()
public void run()
run in interface Runnable
public void close()
throws IOException
EndPoint
close in interface EndPointclose in class ChannelEndPointIOExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||