com.rbnb.api
Class EndOfStream

java.lang.Object
  extended by com.rbnb.api.Rmap
      extended by com.rbnb.api.EndOfStream
All Implemented Interfaces:
com.rbnb.utility.SortCompareInterface, com.rbnb.utility.SortInterface, Serializable, Cloneable

public class EndOfStream
extends Rmap

Marks the end of a stream (request).

This class is an extension of the Rmap class that is used to mark the normal end of the stream of responses to a request. An object of this class is always returned as the last response to a request (unless an error occurs).

The EndOfStream object may contain data from the request and should be processed normally. It may turn out to be empty.

Since:
V2.0
See Also:
Serialized Form
Author:
Ian Brown
Version:
03/28/2003

Field Summary
static byte REASON_BOD
          the request was before the beginning of the data.
static byte REASON_END
          reached the end of the request.
static byte REASON_EOD
          the request was after the end of the data.
static byte REASON_ERROR
          an error occured trying to retrieve the data.
static byte REASON_NODATA
          failed to match any data.
static byte REASON_NONAME
          failed to match any names.
static String[] REASONS
          text strings for reporting the reason for the end of the stream.
 
Fields inherited from class com.rbnb.api.Rmap
PATHDELIMITER
 
Constructor Summary
EndOfStream()
          Class constructor.
EndOfStream(byte reasonI)
          Class constructor to build an EndOfStream for the specified reason code.
 
Method Summary
 byte getReason()
          Gets the reason code.
 void setReason(byte reasonI)
          Sets the reason code.
 
Methods inherited from class com.rbnb.api.Rmap
addChannel, addChild, addChildAt, addDataWithTimeReference, addMember, clone, collapse, compareNames, compareNames, compareNames, compareTo, compareTo, createFromName, extract, extract, extractFolders, extractFoldersAndChannels, extractNames, extractRmap, findChild, findDescendant, findMember, getChildAt, getChildren, getDblock, getFrange, getFullName, getMemberAt, getMembers, getName, getNchildren, getNmembers, getParent, getTrange, isImplemented, markLeaf, mergeWith, moveToBottom, moveToTop, nullify, removeChild, removeChildAt, removeMember, removeMemberAt, setDblock, setFrange, setName, setTrange, sortField, toNameHierarchy, toString, toString, xmlRegistration, xmlRegistration
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REASON_BOD

public static final byte REASON_BOD
the request was before the beginning of the data.

Since:
V2.0
See Also:
Constant Field Values
Author:
Ian Brown
Version:
09/28/2001

REASON_END

public static final byte REASON_END
reached the end of the request.

This indicates a normal end of the request. It indicates that all of the repetitions of the request have been matched.

Since:
V2.0
See Also:
Constant Field Values
Author:
Ian Brown
Version:
09/28/2001

REASON_EOD

public static final byte REASON_EOD
the request was after the end of the data.

Since:
V2.0
See Also:
Constant Field Values
Author:
Ian Brown
Version:
09/28/2001

REASON_ERROR

public static final byte REASON_ERROR
an error occured trying to retrieve the data.

Since:
V2.0
See Also:
Constant Field Values
Author:
Ian Brown
Version:
04/23/2002

REASON_NODATA

public static final byte REASON_NODATA
failed to match any data.

Since:
V2.0
See Also:
Constant Field Values
Author:
Ian Brown
Version:
09/28/2001

REASON_NONAME

public static final byte REASON_NONAME
failed to match any names.

Since:
V2.0
See Also:
Constant Field Values
Author:
Ian Brown
Version:
09/28/2001

REASONS

public static final String[] REASONS
text strings for reporting the reason for the end of the stream.

Since:
V2.0
Author:
Ian Brown
Version:
04/23/2002
Constructor Detail

EndOfStream

public EndOfStream()
Class constructor.

Since:
V2.0
Author:
Ian Brown
Version:
09/28/2001

EndOfStream

public EndOfStream(byte reasonI)
Class constructor to build an EndOfStream for the specified reason code.

Parameters:
reasonI - the reason code.
Throws:
IllegalArgumentException - thrown if the reason code is not valid.
Since:
V2.0
See Also:
REASON_BOD, REASON_END, REASON_EOD, REASON_ERROR, REASON_NODATA, REASON_NONAME
Author:
Ian Brown
Version:
04/23/2002
Method Detail

getReason

public final byte getReason()
Gets the reason code.

Returns:
the reason code.
Since:
V2.0
See Also:
REASON_BOD, REASON_END, REASON_EOD, REASON_ERROR, REASON_NODATA, REASON_NONAME
Author:
Ian Brown
Version:
04/23/2002

setReason

public final void setReason(byte reasonI)
Sets the reason code.

Parameters:
reasonI - the reason code.
Throws:
IllegalArgumentException - thrown if the reason code is not valid.
Since:
V2.0
See Also:
REASON_BOD, REASON_END, REASON_EOD, REASON_ERROR, REASON_NODATA, REASON_NONAME
Author:
Ian Brown
Version:
04/23/2002