mil.navy.nps.dis
Class BehaviorStreamBufferInfo

java.lang.Object
  extended bymil.navy.nps.dis.BehaviorStreamBufferInfo

public class BehaviorStreamBufferInfo
extends java.lang.Object

BehaviorStreamBufferInfo is an object that contains configuration data about a BehaviorStreamBuffer. This data includes information such as whether the data that is coming in is RTP enabled, sources of further information, such as web sites, etc.

The object uses a dual scheme for creating objects. In effect this is an object with a unique serialization scheme, made unique because we want the serialized format to comply with our wishes. ("Oh, Behave!" --Austin Powers). We write out our various state variables as attribute-value pairs, delimited by spaces. we can create a new object from such a String object. Or we can create the string object from the data in the object.

Significant attribute-value pairs as of this writing:

rtpEnabled=true|false. If true, the PDUs in this stream have RTP turned on, and so therefore have a bunch of binary data prepended to them.

worldSite=url. There can be zero or more worldSite attribute-value pairs. This describes a URL that contains information about the virtual world used to create this PDU stream.

Author:
DMcG

Field Summary
static int CURRENT_VERSION
           
static java.lang.String RTP_ENABLED
           
static java.lang.String URL
           
static java.lang.String VERSION
           
 
Constructor Summary
BehaviorStreamBufferInfo()
          Plain, no-args constructor
BehaviorStreamBufferInfo(boolean pRtpEnabled)
           
BehaviorStreamBufferInfo(boolean pRtpEnabled, java.lang.String[] pURLs)
          Constructor, takes the RTP status and an array of strings that describe the world we got this PDU stream from.
BehaviorStreamBufferInfo(java.lang.String pConfigString)
          Convert a string of attribute-value pairs into a filled out info object.
 
Method Summary
 void addUrl(java.lang.String pURL)
          Add a URL to our list of URLs about this stream
 boolean getRtpEnabled()
          Get status of RTP for this stream
 java.lang.String[] getUrls()
          Returns an array filled with all the URLs we have.
 int getVersion()
          Return the version number, which has an effect on what attributes are valid.
 void setRtpEnabled(boolean pEnabled)
          is the rtp capability enabled or not?
 java.lang.String toString()
          Convert the object to a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CURRENT_VERSION

public static final int CURRENT_VERSION
See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values

URL

public static final java.lang.String URL
See Also:
Constant Field Values

RTP_ENABLED

public static final java.lang.String RTP_ENABLED
See Also:
Constant Field Values
Constructor Detail

BehaviorStreamBufferInfo

public BehaviorStreamBufferInfo()
Plain, no-args constructor


BehaviorStreamBufferInfo

public BehaviorStreamBufferInfo(boolean pRtpEnabled)

BehaviorStreamBufferInfo

public BehaviorStreamBufferInfo(boolean pRtpEnabled,
                                java.lang.String[] pURLs)
Constructor, takes the RTP status and an array of strings that describe the world we got this PDU stream from.

Parameters:
pRtpEnabled - whether RTP is enabled for this stream
pURLs - array of strings that describe URLS about this pdu stream

BehaviorStreamBufferInfo

public BehaviorStreamBufferInfo(java.lang.String pConfigString)
Convert a string of attribute-value pairs into a filled out info object.

Method Detail

toString

public java.lang.String toString()
Convert the object to a string. The string will be of the form "attribute=value attribute=value attribute=value", etc.


setRtpEnabled

public void setRtpEnabled(boolean pEnabled)
is the rtp capability enabled or not?


getRtpEnabled

public boolean getRtpEnabled()
Get status of RTP for this stream


getVersion

public int getVersion()
Return the version number, which has an effect on what attributes are valid. Note that we don't set versions--that's handled in the constructor, and we can't really modify it after the fact.


addUrl

public void addUrl(java.lang.String pURL)
Add a URL to our list of URLs about this stream


getUrls

public java.lang.String[] getUrls()
Returns an array filled with all the URLs we have.