com.edustructures.sifworks
Interface DataObjectInputStream


public interface DataObjectInputStream

DataObjectInputStream is supplied to message handlers to allow agents to stream an arbitrarily large set of SIFDataObjects from SIF_Response and SIF_Event messages.

To use DataObjectInputStream, construct a while loop that calls available() to determine if more objects are available from the stream. Within the loop, call readDataObject() to obtain the next SIFDataObject instance from the stream. Note all SIFDataObjects in the stream are of the same type. To determine the type, call getObjectType() to retrieve an ElementDef constant from the SIFDTD class.

For example,

if( myStream.getObjectType() == SIFDTD.STUDENTPERSONAL ) {
    while( myStream.available() ) {
        StudentPersonal sp = (StudentPersonal)myStream.readDataObject();
        ...
    }
}

Version:
ADK 1.0

Method Summary
 boolean available()
          Determines if any SIFDataObjects are currently available for reading
 ElementDef getObjectType()
          Determines the type of SIF Data Object provided by the stream
 SIFDataObject readDataObject()
          Read the next SIFDataObject from the stream
 

Method Detail

readDataObject

SIFDataObject readDataObject()
                             throws ADKException
Read the next SIFDataObject from the stream

Throws:
ADKException

getObjectType

ElementDef getObjectType()
Determines the type of SIF Data Object provided by the stream

Returns:
An ElementDef constant from the SIFDTD class (e.g. SIFDTD.STUDENTPERSONAL)

available

boolean available()
Determines if any SIFDataObjects are currently available for reading



Copyright © 2001-2007 Edustructures LLC. All Rights Reserved. SIFWorks® and ADK® are registered trademarks of Edustructures LLC. SIF™ and Schools Interoperability Framework are trademarks of the Schools Interoperability Framework Association.