All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.lib.FlowBase
java.lang.Object
   |
   +----edu.utah.janos.core.FlowRun
           |
           +----edu.utah.janos.lib.FlowBase

  Summary

public abstract class  FlowBase
     extends edu.utah.janos.core.FlowRun
{
          // Fields 5
     public String[] args;
     protected FreeList bufferHandleFreeList;
     public CommSpaceHandle commSpaceHandle;
     public Flow flow;
     public ThreadPool threadPool;

          // Constructors 1
     public FlowBase();

          // Methods 4
     public synchronized BufferHandle newBufferHandle();
     public synchronized void recycleBufferHandle(BufferHandle);
     public void run(Flow, ThreadPool, String[], CommSpaceHandle) throws Exception;
     public abstract void start() throws Exception;
}

A protocol should override FlowBase so that a flow can be created for it. When the flow is created, the overridden start() method is called.

The threadPool, flow, and args variables are guaranteed to be set before start() is called, but may not be set when the constructor is called.


  Cross Reference

Extended By:
HelloWorld, TPTest, UdpTest





  Fields

· flow

Summary  |  Top
   public Flow flow


· threadPool

Summary  |  Top
   public ThreadPool threadPool


· args

Summary  |  Top
   public String[] args


· commSpaceHandle

Summary  |  Top
   public CommSpaceHandle commSpaceHandle


· bufferHandleFreeList

Summary  |  Top
   protected FreeList bufferHandleFreeList


  Constructors

· FlowBase

Summary  |  Top

   public FlowBase() 

Default constructor



  Methods

· run

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

This sets the threadPool, flow, and args fields and then calls start().

Overrides:
run in class FlowRun


· newBufferHandle

Summary  |  Top
   public synchronized BufferHandle newBufferHandle() 

Overrides:
newBufferHandle in class FlowRun


· recycleBufferHandle

Summary  |  Top
   public synchronized void recycleBufferHandle(BufferHandle b) 

Adds the BufferHandle to a freeList, so that it can be reused, and calls reset and removeFromList on the handle to clear its state.

Overrides:
recycleBufferHandle in class FlowRun


· start

Summary  |  Top
   public abstract void start()  throws Exception


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