com.edustructures.sifworks
Interface ReportPublisher


public interface ReportPublisher

The ReportPublisher interface is implemented by message handler classes that respond to requests for SIF_ReportObject. Note the ReportPublisher interface must be used instead of the standard Publisher interface for the SIF_ReportObject object type.

Since:
ADK 1.5
Version:
ADK 1.5

Method Summary
 void onReportRequest(java.lang.String reportObjectRefId, ReportObjectOutputStream out, Query query, Zone zone, MessageInfo info)
          Respond to a SIF_Request for SIF_ReportObject received from a zone.
 

Method Detail

onReportRequest

void onReportRequest(java.lang.String reportObjectRefId,
                     ReportObjectOutputStream out,
                     Query query,
                     Zone zone,
                     MessageInfo info)
                     throws ADKException
Respond to a SIF_Request for SIF_ReportObject received from a zone.

The implementation should evaluate the supplied ReportManifestRefId and Query to build a set of SIFDataObjects that satisfy the conditions and field restrictions placed on the query. If the agent cannot satisfy the query it should return without taking any action.

Assign report information to the ReportObjectOutputStream object by constructing a ReportInfo instance (from the com.edustructures.sifworks.reporting package) and passing that instance to the setReportInfo method. Alternatively, you may call the following methods directly:

To return the SIF Data Objects that comprise the report, repeatedly call the ReportObjectOutputStream.write( SIFDataObject ) method. To return an error with the response, call the setError method or throw a SIFException. The ADK will convert the exception into a SIF_Error element and include it in the payload of the SIF_Response.

The ADK returns the results of the request to the requestor by sending one or more SIF_Response messages with packetized SIF_ReportObject payloads. This is handled in a separate thread managed by the framework. If the number of SIFDataObjects passed to the output stream is too large to fit into a single SIF_ReportObject and SIF_Response message, the ADK handles breaking it up into multiple packets. The result data may be temporarily stored on disk until all packets can be returned to the ZIS.

Parameters:
reportObjectRefId - The RefId of the SIF_ReportObject being requested
out - The output stream to send SIFDataObject results to
query - The query conditions
zone - The zone this SIF_Request was received on
info - Provides protocol-specific information about the message.
Throws:
ADKException


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.