All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.antsr.core.MIDIDRequestCapsule
java.lang.Object
   |
   +----edu.utah.janos.antsr.core.Capsule
           |
           +----edu.utah.janos.antsr.core.MIDIDRequestCapsule

  Summary

final class  MIDIDRequestCapsule
     extends edu.utah.janos.antsr.core.Capsule
{
          // Fields 4
     static final byte[] MID;
     private static final byte[] PID;
     public static final String VERSION;
     private TypeID unknownMID;

          // Constructors 2
     MIDIDRequestCapsule();
     MIDIDRequestCapsule(int, TypeID);

          // Methods 7
     public Xdr decode();
     public Xdr encode();
     public boolean evaluate(Node);
     public int length();
     protected byte[] mid();
     protected byte[] pid();
     public String toString();
}

MID ID Request capsule.

The MIDIDRequestCapsule adds one field to the base Capsule:

Pat said to make a note that this capsule could be a flow control message for data packets. It says, "woah, stop sending data until the code is loaded". But we don't take advantage of this yet.

Author:
Janos Ministry of Development , Janos Ministry of Development

See Also: DLProtocol, MIDIDResponseCapsule




  Fields

· VERSION

Summary  |  Top

   public static final String VERSION


· MID

Summary  |  Top
   static final byte[] MID


· PID

Summary  |  Top
   private static final byte[] PID


· unknownMID

Summary  |  Top
   private TypeID unknownMID

The TypeID of the unknown MID this Capsule represents. This is set only by the constructor (for outgoing MIDIDRequestCapsules) or by the decode() function (for incoming MIDIDRequestCapsules).


  Constructors

· MIDIDRequestCapsule

Summary  |  Top

   MIDIDRequestCapsule() 

Create a blank MIDIDRequestCapsule.

This constructor should only be invoked when a MIDIDRequestCapsule is being received and decoded.



· MIDIDRequestCapsule

Summary  |  Top
   MIDIDRequestCapsule(int dst, 
                       TypeID unknownMID) 

Create a MIDIDRequestCapsule that will request info on the given unknown MID.

This constructor is only invoked by DLProtocolHandler. // XXX which is being renamed.



  Methods

· mid

Summary  |  Top
   protected byte[] mid() 
Overrides:
mid in class Capsule


· pid

Summary  |  Top
   protected byte[] pid() 
Overrides:
pid in class Capsule


· length

Summary  |  Top
   public int length() 
Overrides:
length in class Capsule


· encode

Summary  |  Top
   public Xdr encode() 
Overrides:
encode in class Capsule


· decode

Summary  |  Top
   public Xdr decode() 
Overrides:
decode in class Capsule


· evaluate

Summary  |  Top
   public boolean evaluate(Node node) 

Evaluate a MIDIDRequestCapsule. Based on the unknownMID stored in this capsule, lookup the CapsuleClass on the local node. If the CapsuleClass is not available drop the request on the floor. Otherwise, send a MIDIDResponseCapsule with the Protocol identity of the MID.

If the MIDIDRequestCapsule is for a builtin type, just drop the request.

Overrides:
evaluate in class Capsule

See Also: CodeGroup



· toString

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


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