All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.io.StatusMessage
java.lang.Object
   |
   +----edu.utah.janos.io.StatusMessage

  Summary

public class  StatusMessage
     extends java.lang.Object
{
          // Fields 6
     private static final int PACKET_SIZE;
     public static final byte SMF_REPLY;
     public static final byte SMM_NONE;
     public static final byte SMM_QUERY;
     private byte[] data;
     private DatagramPacket dp;

          // Constructors 1
     public StatusMessage();

          // Methods 17
     public static int decodeInt(byte[], int);
     public static short decodeShort(byte[], int);
     public static void encodeInt(byte[], int, int);
     public static void encodeShort(byte[], int, short);

     public InetAddress getAddress();
     public DatagramPacket getDatagramPacket();
     public byte getFlags();
     public byte getMethodID();
     public int getPort();
     public byte[] getValue();
     public int getValueOffset();
     public int getValueSize();
     public void setAddress(InetAddress);
     public void setFlags(byte);
     public void setMethodID(byte);
     public void setPort(int);
     public void setValueSize(int);
}

A datagram packet that can be used to report information about a node




  Fields

· PACKET_SIZE

Summary  |  Top

   private static final int PACKET_SIZE

XXX Max packet size


· SMM_NONE

Summary  |  Top
   public static final byte SMM_NONE

Method IDs for a packet (i.e. what do they want to know?)


· SMM_QUERY

Summary  |  Top
   public static final byte SMM_QUERY


· SMF_REPLY

Summary  |  Top
   public static final byte SMF_REPLY

Flags for the message


· data

Summary  |  Top
   private byte[] data

Byte array for the packet data


· dp

Summary  |  Top
   private DatagramPacket dp

The real packet that gets sent back and forth


  Constructors

· StatusMessage

Summary  |  Top

   public StatusMessage() 

Default constructor



  Methods

· encodeShort

Summary  |  Top
   public static void encodeShort(byte[] data, 
                                  int offset, 
                                  short s) 

Encode a short in the byte array at the given offset



· encodeInt

Summary  |  Top
   public static void encodeInt(byte[] data, 
                                int offset, 
                                int i) 

Encode an int in the byte array at the given offset



· decodeShort

Summary  |  Top
   public static short decodeShort(byte[] data, 
                                   int offset) 

decode a short in the byte array at the given offset



· decodeInt

Summary  |  Top
   public static int decodeInt(byte[] data, 
                               int offset) 

decode an int in the byte array at the given offset



· getDatagramPacket

Summary  |  Top
   public DatagramPacket getDatagramPacket() 

Get the real datagram packet



· setAddress

Summary  |  Top
   public void setAddress(InetAddress ia) 

Set the peer address



· getAddress

Summary  |  Top
   public InetAddress getAddress() 

Get the peer address



· setPort

Summary  |  Top
   public void setPort(int port) 

Set the peer port



· getPort

Summary  |  Top
   public int getPort() 

Get the peer port



· setMethodID

Summary  |  Top
   public void setMethodID(byte method) 

Set the method for this message



· getMethodID

Summary  |  Top
   public byte getMethodID() 

Get the method for this message



· setFlags

Summary  |  Top
   public void setFlags(byte flags) 

Set the flags for this message



· getFlags

Summary  |  Top
   public byte getFlags() 

Get the flags for this message



· setValueSize

Summary  |  Top
   public void setValueSize(int size) 

Set the size of the message payload



· getValueSize

Summary  |  Top
   public int getValueSize() 

Get the size of the message payload



· getValue

Summary  |  Top
   public byte[] getValue() 

Get the byte array for the packet



· getValueOffset

Summary  |  Top
   public int getValueOffset() 

Get the offset into the value array where the value actually starts



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