JNodeOS v1.1.5 API

edu.utah.janos.io
Class StatusMessage

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

public class StatusMessage
extends java.lang.Object

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


Field Summary
static byte SMF_REPLY
          Flags for the message
static byte SMM_NONE
          Method IDs for a packet (i.e.
static byte SMM_QUERY
           
 
Constructor Summary
StatusMessage()
           
 
Method Summary
static int decodeInt(byte[] data, int offset)
          decode an int in the byte array at the given offset
static short decodeShort(byte[] data, int offset)
          decode a short in the byte array at the given offset
static void encodeInt(byte[] data, int offset, int i)
          Encode an int in the byte array at the given offset
static void encodeShort(byte[] data, int offset, short s)
          Encode a short in the byte array at the given offset
 java.net.InetAddress getAddress()
          Get the peer address
 java.net.DatagramPacket getDatagramPacket()
          Get the real datagram packet
 byte getFlags()
          Get the flags for this message
 byte getMethodID()
          Get the method for this message
 int getPort()
          Get the peer port
 byte[] getValue()
          Get the byte array for the packet
 int getValueOffset()
          Get the offset into the value array where the value actually starts
 int getValueSize()
          Get the size of the message payload
 void setAddress(java.net.InetAddress ia)
          Set the peer address
 void setFlags(byte flags)
          Set the flags for this message
 void setMethodID(byte method)
          Set the method for this message
 void setPort(int port)
          Set the peer port
 void setValueSize(int size)
          Set the size of the message payload
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SMM_NONE

public static final byte SMM_NONE
Method IDs for a packet (i.e. what do they want to know?)

SMM_QUERY

public static final byte SMM_QUERY

SMF_REPLY

public static final byte SMF_REPLY
Flags for the message
Constructor Detail

StatusMessage

public StatusMessage()
Method Detail

encodeShort

public static void encodeShort(byte[] data,
                               int offset,
                               short s)
Encode a short in the byte array at the given offset

encodeInt

public static void encodeInt(byte[] data,
                             int offset,
                             int i)
Encode an int in the byte array at the given offset

decodeShort

public static short decodeShort(byte[] data,
                                int offset)
decode a short in the byte array at the given offset

decodeInt

public static int decodeInt(byte[] data,
                            int offset)
decode an int in the byte array at the given offset

getDatagramPacket

public java.net.DatagramPacket getDatagramPacket()
Get the real datagram packet

setAddress

public void setAddress(java.net.InetAddress ia)
Set the peer address

getAddress

public java.net.InetAddress getAddress()
Get the peer address

setPort

public void setPort(int port)
Set the peer port

getPort

public int getPort()
Get the peer port

setMethodID

public void setMethodID(byte method)
Set the method for this message

getMethodID

public byte getMethodID()
Get the method for this message

setFlags

public void setFlags(byte flags)
Set the flags for this message

getFlags

public byte getFlags()
Get the flags for this message

setValueSize

public void setValueSize(int size)
Set the size of the message payload

getValueSize

public int getValueSize()
Get the size of the message payload

getValue

public byte[] getValue()
Get the byte array for the packet

getValueOffset

public int getValueOffset()
Get the offset into the value array where the value actually starts

JNodeOS v1.1.5 API

This documentation is Copyright (C) 1998-2001 The University of Utah. All Rights Reserved. See the file LICENSE for distribution terms.
Documentation, software, and mailing list archives for Janos can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/