package cdac.medinfo.sdk.hl7282.hl7net.commons;

import cdac.medinfo.sdk.hl7282.commoninterface.ISegmentSet;
import cdac.medinfo.sdk.hl7282.commoninterface.ISingleCollection;


/**
* The Interactive Continuation Protocol defines the methodology for the 
* intentional transmission of a large query-response payload over 
* multiple HL7 messages.Without this protocol, the response would be returned 
* in a single large logical message.
* The implementor of this interface should provide processSend,processReceive,
* generateCancellationQuery,generateInteractiveQuery methods.
* The class which implement this interface will track the sending queries and receiving responses.
* In addition it will generate interactive query and cancellation query for already triggered query.  
*/
public interface IServerInteractiveContinuation 
{
	
	/**
	 * Keeps the logs of outgoing Interactive Responses. 
	 * @param objSegmentSet object of Segment Set received.
	 */
	void processSend(ISegmentSet objSegmentSet);

	/**
	 * Keeps the logs of incoming Interactive Queries.
	 * @param objSegmentSet object of Segment Set received.
	 */
	boolean processReceive(ISegmentSet objSegmentSet);

	/**
	 * Retrieves the number of query fired for specified Query ID.
	 * @param strQueryID object of Query id for which retrieving Segment Set. 
	 * @return ISegmentSet object of Segment Set. 
	 */
	ISegmentSet generateInteractiveResponse(String strQueryID);
	
	/**
	 * Returns the query id for all Unprocessed Response. 
	 * @return ISingleCollection<String> collection of strings.
	 */
	ISingleCollection<String> getUnprocessedResponse();
}
