com.edustructures.sifworks
Interface DataObjectOutputStream


public interface DataObjectOutputStream

DataObjectOutputStream is supplied to the Publisher.onRequest message handler to allow agents to stream an arbitrarily large set of SIFDataObjects when responding to SIF_Request messages. The ADK handles packetizing the objects into SIF_Response packets, which are stored in a cache on the local file system until they can be delivered to the zone.

ADK 1.5.1 introduces a mechanism to decouple SIF_Request processing from SIF_Response delivery, which is necessary when implementing the StudentLocator message choreography or to place inbound SIF_Request messages in a work queue for processing at a later time. Call the deferResponse() method to inform the ADK that you will take responsibility for processing the SIF_Request message at a later time after the Publisher.onRequest method has completed. Note the ADK immediately acknowledges the SIF_Request when onRequest returns, but because the deferResponse method has been called it does not attempt to send cached SIF_Response packets to the zone. When your agent is ready to process the request, it can use the SIFResponseSender class to stream, packetize, and deliver SIF_Responses. See the class comments for more information.

Version:
ADK 1.0

Method Summary
 void deferResponse()
          Defer sending SIF_Response messages and ignore any objects written to this stream.
 void setAutoFilter(Query filter)
          Tells the DataObjectOutputStream to automatically filter out any SIFDataObjects that do not match the conditions specified in the provided Query object.
 void write(SIFDataObject data)
          Write a SIFDataObject to the stream
 

Method Detail

setAutoFilter

void setAutoFilter(Query filter)
Tells the DataObjectOutputStream to automatically filter out any SIFDataObjects that do not match the conditions specified in the provided Query object.

Any SIFDataObject that does not meet the conditions specified in the Query will not be written to the underlying data stream.

Parameters:
filter - The Query object to use when filtering data or null to remove the filter

write

void write(SIFDataObject data)
           throws ADKException
Write a SIFDataObject to the stream

Parameters:
data - A SIFDataObject instance to write to the output stream
Throws:
ADKException

deferResponse

void deferResponse()
                   throws ADKException
Defer sending SIF_Response messages and ignore any objects written to this stream.

See the SIFResponseSender class comments for more information about using this method.

Throws:
ADKException
Since:
ADK 1.5.1
See Also:
SIFResponseSender


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.