All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.ants.ants.CapsuleChannel
java.lang.Object
   |
   +----edu.utah.janos.ants.ants.CapsuleChannel

  Summary

final class  CapsuleChannel
     extends java.lang.Object
     implements edu.utah.janos.core.DeliverFunc
{
          // Fields 3
     Class cl;
     private ANTSDemultiplexKey classifier;
     InChannel inChannel;

          // Constructors 4
     CapsuleChannel(CapsuleClass);
     CapsuleChannel(CapsuleClass, ThreadPool);
     CapsuleChannel(Class, ANTSDemultiplexKey);
     CapsuleChannel(Class, ANTSDemultiplexKey, ThreadPool);

          // Methods 2
     public void receive(BufferHandle, int) throws IOException;
     public String toString();
}

The handler for incoming ANTS packets. They get decoded into Capsules and evaluted here.




  Fields

· cl

Summary  |  Top

   Class cl


· inChannel

Summary  |  Top
   InChannel inChannel


· classifier

Summary  |  Top
   private ANTSDemultiplexKey classifier


  Constructors

· CapsuleChannel

Summary  |  Top

   CapsuleChannel(CapsuleClass cc) 


· CapsuleChannel

Summary  |  Top
   CapsuleChannel(CapsuleClass cc, 
                  ThreadPool threadPool) 

Construct a receive channel for cc Capsules. Implicitly constructs an ANTSDemultiplexKey to match the right packets.



· CapsuleChannel

Summary  |  Top
   CapsuleChannel(Class cl, 
                  ANTSDemultiplexKey classifier) 


· CapsuleChannel

Summary  |  Top
   CapsuleChannel(Class cl, 
                  ANTSDemultiplexKey classifier, 
                  ThreadPool threadPool) 


  Methods

· receive

Summary  |  Top
   public void receive(BufferHandle packet, 
                       int payloadStart)  throws IOException

Handler for packets delivered to this Channel.

Receives a BufferHandle and decodes the packet into a Capsule.

Assumes packet[0] is the first byte of the ANEP header...

XXX this is atrocious code. Rewrite it now.

Implements:
receive in interface DeliverFunc


· toString

Summary  |  Top
   public String toString() 
Overrides:
toString in class Object


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