org.eclipse.jetty.io.nio
Class NetworkTrafficSelectChannelEndPoint
java.lang.Object
org.eclipse.jetty.io.nio.ChannelEndPoint
org.eclipse.jetty.io.nio.SelectChannelEndPoint
org.eclipse.jetty.io.nio.NetworkTrafficSelectChannelEndPoint
- All Implemented Interfaces:
- AsyncEndPoint, ConnectedEndPoint, EndPoint
public class NetworkTrafficSelectChannelEndPoint
- extends SelectChannelEndPoint
Methods inherited from class org.eclipse.jetty.io.nio.SelectChannelEndPoint |
blockReadable, blockWritable, cancelIdle, checkIdleTimestamp, close, dispatch, flush, getConnection, getSelectionKey, getSelectManager, getSelectSet, handle, idleExpired, isReadyForDispatch, schedule, scheduleIdle, scheduleWrite, setConnection, setMaxIdleTime, toString, undispatch |
Methods inherited from class org.eclipse.jetty.io.nio.ChannelEndPoint |
flush, getChannel, getLocalAddr, getLocalHost, getLocalPort, getMaxIdleTime, getRemoteAddr, getRemoteHost, getRemotePort, getTransport, isBlocking, isBufferingInput, isBufferingOutput, isBufferred, isInputShutdown, isOpen, isOutputShutdown, shutdownInput, shutdownOutput |
Methods inherited from interface org.eclipse.jetty.io.EndPoint |
flush, getLocalAddr, getLocalHost, getLocalPort, getMaxIdleTime, getRemoteAddr, getRemoteHost, getRemotePort, getTransport, isBlocking, isBufferingInput, isBufferingOutput, isBufferred, isInputShutdown, isOpen, isOutputShutdown, shutdownInput, shutdownOutput |
NetworkTrafficSelectChannelEndPoint
public NetworkTrafficSelectChannelEndPoint(SocketChannel channel,
SelectorManager.SelectSet selectSet,
SelectionKey key,
int maxIdleTime,
List<NetworkTrafficListener> listeners)
throws IOException
- Throws:
IOException
fill
public int fill(Buffer buffer)
throws IOException
- Description copied from interface:
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.
- Specified by:
fill
in interface EndPoint
- Overrides:
fill
in class ChannelEndPoint
- Returns:
- an
int
value indicating the number of bytes
filled or -1 if EOF is reached.
- Throws:
IOException
flush
public int flush(Buffer buffer)
throws IOException
- Description copied from interface:
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.
- Specified by:
flush
in interface EndPoint
- Overrides:
flush
in class SelectChannelEndPoint
- Parameters:
buffer
- The buffer to flush. This buffers getIndex is updated.
- Returns:
- the number of bytes written
- Throws:
IOException
gatheringFlush
protected int gatheringFlush(Buffer header,
ByteBuffer bbuf0,
Buffer buffer,
ByteBuffer bbuf1)
throws IOException
- Overrides:
gatheringFlush
in class ChannelEndPoint
- Throws:
IOException
notifyOpened
public void notifyOpened()
notifyIncoming
public void notifyIncoming(Buffer buffer,
int read)
notifyOutgoing
public void notifyOutgoing(Buffer buffer,
int position,
int written)
notifyClosed
public void notifyClosed()
Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.