Package org.eclipse.jetty.io
Class NetworkTrafficSocketChannelEndPoint
- java.lang.Object
-
- org.eclipse.jetty.io.IdleTimeout
-
- org.eclipse.jetty.io.AbstractEndPoint
-
- org.eclipse.jetty.io.ChannelEndPoint
-
- org.eclipse.jetty.io.SocketChannelEndPoint
-
- org.eclipse.jetty.io.NetworkTrafficSocketChannelEndPoint
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,EndPoint
,ManagedSelector.Selectable
- Direct Known Subclasses:
NetworkTrafficSelectChannelEndPoint
@Deprecated(since="2021-05-27") public class NetworkTrafficSocketChannelEndPoint extends SocketChannelEndPoint
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.A specialized version of
SocketChannelEndPoint
that supportsNetworkTrafficListener
s.
-
-
Constructor Summary
Constructors Constructor Description NetworkTrafficSocketChannelEndPoint(java.nio.channels.SelectableChannel channel, ManagedSelector selectSet, java.nio.channels.SelectionKey key, Scheduler scheduler, long idleTimeout, java.util.List<NetworkTrafficListener> listeners)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
fill(java.nio.ByteBuffer buffer)
Deprecated.Fill the passed buffer with data from this endpoint.boolean
flush(java.nio.ByteBuffer... buffers)
Deprecated.Flush data from the passed header/buffer to this endpoint.void
notifyIncoming(java.nio.ByteBuffer buffer, int read)
Deprecated.void
notifyOutgoing(java.nio.ByteBuffer view)
Deprecated.void
onClose()
Deprecated.Callback method invoked when this EndPoint is close.void
onOpen()
Deprecated.Callback method invoked when this EndPoint is opened.-
Methods inherited from class org.eclipse.jetty.io.SocketChannelEndPoint
getSocket
-
Methods inherited from class org.eclipse.jetty.io.ChannelEndPoint
doClose, getChannel, getLocalAddress, getRemoteAddress, getTransport, isOpen, isOptimizedForDirectBuffers, onSelected, replaceKey, toEndPointString, updateKey
-
Methods inherited from class org.eclipse.jetty.io.AbstractEndPoint
checkFill, checkFlush, close, fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getWriteFlusher, isFillInterested, isInputShutdown, isOutputShutdown, setConnection, shutdownOutput, toConnectionString, toString, tryFillInterested, upgrade, write
-
Methods inherited from class org.eclipse.jetty.io.IdleTimeout
getIdleFor, getIdleTimeout, getScheduler, notIdle, setIdleTimeout
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.io.EndPoint
getIdleTimeout, setIdleTimeout
-
-
-
-
Constructor Detail
-
NetworkTrafficSocketChannelEndPoint
public NetworkTrafficSocketChannelEndPoint(java.nio.channels.SelectableChannel channel, ManagedSelector selectSet, java.nio.channels.SelectionKey key, Scheduler scheduler, long idleTimeout, java.util.List<NetworkTrafficListener> listeners)
Deprecated.
-
-
Method Detail
-
fill
public int fill(java.nio.ByteBuffer buffer) throws java.io.IOException
Deprecated.Description copied from interface:EndPoint
Fill the passed buffer with data from this endpoint. The bytes are appended to any data already in the buffer by writing from the buffers limit up to it's capacity. The limit is updated to include the filled bytes.- Specified by:
fill
in interfaceEndPoint
- Overrides:
fill
in classChannelEndPoint
- Parameters:
buffer
- The buffer to fill. The position and limit are modified during the fill. After the operation, the position is unchanged and the limit is increased to reflect the new data filled.- Returns:
- an
int
value indicating the number of bytes filled or -1 if EOF is read or the input is shutdown. - Throws:
java.io.IOException
- if the endpoint is closed.
-
flush
public boolean flush(java.nio.ByteBuffer... buffers) throws java.io.IOException
Deprecated.Description copied from interface:EndPoint
Flush data from the passed header/buffer to this endpoint. As many bytes as can be consumed are taken from the header/buffer position up until the buffer limit. The header/buffers position is updated to indicate how many bytes have been consumed.- Specified by:
flush
in interfaceEndPoint
- Overrides:
flush
in classChannelEndPoint
- Parameters:
buffers
- the buffers to flush- Returns:
- True IFF all the buffers have been consumed and the endpoint has flushed the data to its destination (ie is not buffering any data).
- Throws:
java.io.IOException
- If the endpoint is closed or output is shutdown.
-
onOpen
public void onOpen()
Deprecated.Description copied from interface:EndPoint
Callback method invoked when this EndPoint is opened.
- Specified by:
onOpen
in interfaceEndPoint
- Overrides:
onOpen
in classAbstractEndPoint
- See Also:
EndPoint.onClose()
-
onClose
public void onClose()
Deprecated.Description copied from interface:EndPoint
Callback method invoked when this EndPoint is close.
- Specified by:
onClose
in interfaceEndPoint
- Overrides:
onClose
in classChannelEndPoint
- See Also:
EndPoint.onOpen()
-
notifyIncoming
public void notifyIncoming(java.nio.ByteBuffer buffer, int read)
Deprecated.
-
notifyOutgoing
public void notifyOutgoing(java.nio.ByteBuffer view)
Deprecated.
-
-