All Packages This Package Class Hierarchy Class Search Index
java.lang.Object | +----edu.utah.janos.nodeos.InChannel
Summary |
public final class InChannel extends java.lang.Object { // Fields 8 final DemultiplexKey classifier; private final DeliverFunc deliverFunc; public static final byte[] exitPacket; final Flow flow; private ProtocolLayer.PacketBuffer freeBufferQ; private final Object freeBufferQLock; private InChannelDispatcher handler; private final ThreadPool threadPool; // Constructors 1 public InChannel(Flow, DemultiplexKey, String, String, ThreadPool, DeliverFunc) throws IOException, ProtocolLayer.PacketAddressFormatException, ProtocolSpec.FormatException; // Methods 8 public void addBuffer(ProtocolLayer.PacketBuffer); public void addBuffers(int); void destroy(); void dispatchBuffer(ProtocolLayer.PacketBuffer, int, int); protected void finalize(); public ProtocolLayer.PacketBuffer remBuffer(); public void remBuffers(int); public String toString(); }
Java wrapper for an InChannel.
See Also: CutThroughChannel, OutChannel
Cross Reference |
Fields |
· freeBufferQ | Summary | Top |
private ProtocolLayer.PacketBuffer freeBufferQ
Queue of free packet buffers for this InChannel. Queue is circular, doubly-linked list. freeBufferQ points to the "head", freeBufferQ.prev points to the tail.
· freeBufferQLock | Summary | Top |
private final Object freeBufferQLock
Lock for protecting the free packet buffer queue.
· exitPacket | Summary | Top |
public static final byte[] exitPacket
Death Packet. XXX.
· flow | Summary | Top |
final Flow flow
The flow this receive channel is associated with.
· classifier | Summary | Top |
final DemultiplexKey classifier
The demultiplex key associated with this channel.
· threadPool | Summary | Top |
private final ThreadPool threadPool
The ThreadPool to send incoming packets to. ThreadPool.addWork() had best be protected kernel code (i.e., final).
· handler | Summary | Top |
private InChannelDispatcher handler
· deliverFunc | Summary | Top |
private final DeliverFunc deliverFunc
The callback for delivery.
Constructors |
· InChannel | Summary | Top |
public InChannel(Flow flow, DemultiplexKey classifier, String protocolSpec, String addrSpec, ThreadPool threadPool, DeliverFunc deliverFunc) throws IOException, ProtocolLayer.PacketAddressFormatException, ProtocolSpec.FormatException
Methods |
· dispatchBuffer | Summary | Top |
void dispatchBuffer(ProtocolLayer.PacketBuffer pb, int packetStart, int payloadStart)
Dispatch an incoming packet for this in channel. If the channel can afford the packet one of its own is returned as an exchange. If the channel can't afford the packet then the original one is returned.
· addBuffer | Summary | Top |
public void addBuffer(ProtocolLayer.PacketBuffer pb)
Add a buffer to the InChannel
· remBuffer | Summary | Top |
public ProtocolLayer.PacketBuffer remBuffer()
Remove a buffer from the queue of free buffers on this InChannel. Returns null if there are no free buffers on this InChannel.
· addBuffers | Summary | Top |
public void addBuffers(int count)
Add `count' buffers to the in channel.
XXX also adds `count' workers to the associated flow.
· remBuffers | Summary | Top |
public void remBuffers(int count)
Remove `count' buffers from the channel. Or all the buffers if there are less than `count'.
XXX does not remove `count' workers from the associated flow...
· toString | Summary | Top |
public String toString()
- Overrides:
- toString in class Object
· destroy | Summary | Top |
void destroy()
· finalize | Summary | Top |
protected void finalize()
- Overrides:
- finalize in class Object
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7