All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.nodeos.InChannelDispatcher
java.lang.Object
   |
   +----edu.utah.janos.nodeos.ProtocolLayer.PacketHandler
           |
           +----edu.utah.janos.nodeos.InChannelDispatcher

  Summary

class  InChannelDispatcher
     extends edu.utah.janos.nodeos.ProtocolLayer.PacketHandler
{
          // Fields 3
     private final Vector channels;
     private static final Hashtable dispatchers;
     private ProtocolLayer protocolLayer;

          // Constructors 1
     public InChannelDispatcher();

          // Methods 4
     static InChannelDispatcher getDispatcher(ProtocolLayer, ProtocolLayer.PacketAddressMask) throws IOException;

     void addChannel(InChannel);
     public ProtocolLayer.PacketBuffer handle(ProtocolLayer.PacketBuffer);
     void remChannel(InChannel);
}

Class that is used to dispatch packets from protocol layers to in channels


  Cross Reference

Returned By:
InChannelDispatcher.getDispatcher()





  Fields

· dispatchers

Summary  |  Top
   private static final Hashtable dispatchers

The set of dispatchers for the system.


· protocolLayer

Summary  |  Top
   private ProtocolLayer protocolLayer

The protocol layer that this dispatcher is attached to


· channels

Summary  |  Top
   private final Vector channels

The set of channels that this handler can dispatch too. We only really care about their demultiplex keys since the rest of the demultiplex is done elsewhere.


  Constructors

· InChannelDispatcher

Summary  |  Top

   public InChannelDispatcher() 

Default constructor



  Methods

· getDispatcher

Summary  |  Top
   static InChannelDispatcher getDispatcher(ProtocolLayer pl, 
                                            ProtocolLayer.PacketAddressMask source)  throws IOException

Get the dispatcher that matches the given source mask.

Parameter Description
pl The protocol layer were packets are coming from
source The source address mask packets are matched too



· addChannel

Summary  |  Top
   void addChannel(InChannel newChan) 

Add a channel to this dispatcher. The channel is placed in the selection line by how large its key is, the larger the key the earlier it will be checked.



· remChannel

Summary  |  Top
   void remChannel(InChannel deadChan) 

Remove a channel from this dispatcher.



· handle

Summary  |  Top
   public ProtocolLayer.PacketBuffer handle(ProtocolLayer.PacketBuffer pb) 

Handle a packet that came in through the transport layer.

Overrides:
handle in class ProtocolLayer.PacketHandler


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7