All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.antsr.core.ProtocolBooster
java.lang.Object
   |
   +----edu.utah.janos.nodeos.FlowRun
           |
           +----edu.utah.janos.antsr.core.Booster
                   |
                   +----edu.utah.janos.antsr.core.ProtocolBooster

  Summary

public class  ProtocolBooster
     extends edu.utah.janos.antsr.core.Booster
{
          // Fields 5
     public static final int APP_CAPSULE;
     public static final int LOCAL_PROTOCOL;
     public static final int NEW_MID;
     private boolean local;
     private ThreadPool threadPool;

          // Constructors 1
     public ProtocolBooster(ClassInstantiationKey) throws SecurityException;

          // Methods 4
     private void dispatch(Flow, int, CommQueue, Node) throws InterruptedException, ClassNotFoundException, InstantiationException, IllegalAccessException, FullCodeGroupException, DuplicateCapsuleClassException;
     private void msgLoop(Flow, CommQueue, Node);
     public void run(Flow, ThreadPool, String[], CommSpaceHandle) throws Exception;
     private void startNewGid(Node, TypeID, TypeID, int);
}

This is invoked by PrimordialNode as the intial class in a new flow. This new flow is charged with taking the new (unknown protocol) packet, requesting and loading the code associated with that packet and then processing the packet.

CommSpaceHandle should point to a valid CSH for the Booster class, plus:

   [2] a byte[].  The PID of the protocol this Booster is working for.  XXX Not Used
   [3] an integer -- the logical ANTSR address of the node that sent the packet.
   [4] a slot to write an InChannelHandle into.
 

XXX Should be name DynamicProtocolBooster (As opposed to an app-loaded Protocol).




  Fields

· threadPool

Summary  |  Top

   private ThreadPool threadPool


· NEW_MID

Summary  |  Top
   public static final int NEW_MID

Indicates a new MID, arguments are the MID bytes and the previous node that the packet was at.


· LOCAL_PROTOCOL

Summary  |  Top
   public static final int LOCAL_PROTOCOL

Indicates a local protocol should be instantiated, the only argument is the name of the protocol class. Once this executes the protocol message handler thread is basically useless since the whole protocol is active.


· APP_CAPSULE

Summary  |  Top
   public static final int APP_CAPSULE


· local

Summary  |  Top
   private boolean local


  Constructors

· ProtocolBooster

Summary  |  Top

   public ProtocolBooster(ClassInstantiationKey key)  throws SecurityException


  Methods

· run

Summary  |  Top
   public void run(Flow flow, 
                   ThreadPool threadPool, 
                   String[] args, 
                   CommSpaceHandle commSpaceHandle)  throws Exception
Overrides:
run in class FlowRun


· msgLoop

Summary  |  Top
   private void msgLoop(Flow flow, 
                        CommQueue queue, 
                        Node node) 

This will wait for and process any messages coming in on the CommQueue



· dispatch

Summary  |  Top
   private void dispatch(Flow flow, 
                         int message, 
                         CommQueue queue, 
                         Node node)  throws InterruptedException, ClassNotFoundException, InstantiationException, IllegalAccessException, FullCodeGroupException, DuplicateCapsuleClassException

This will actually dispatch a message in the queue

Parameter Description
flow The current flow
message The integer identifier for the message
queue The queue the message was sent on
node The local node object



· startNewGid

Summary  |  Top
   private void startNewGid(Node node, 
                            TypeID gid, 
                            TypeID mid, 
                            int prev) 


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