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

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

/**
 * IAsyncReceiver is the receiver interface for receiving Deferred Responses. 
 * The class that is interested in receiving an Deferred Responses implements this interface, 
 * When Message is received by HL7 SDK notifyData is method is invoked for message arrival.
 */
public interface IExceptionListener
{
	
	
	/**
	 * When the Exception Occurred.
	 * @param ex Exception occurred while receiving deferred responses.
	 * @param buffer data for which exception is raised.
	 */
	public void onException(Exception ex,byte[] buffer);
	
	/**
	 * Invoked when exception is raised.
	 * @param ex Exception raised
	 * @param objISegmentSet Specifies Object of Segment Set.
	 */
	public void onException(Exception ex,ISegmentSet objISegmentSet);
	
}
