This interface specifies the methods available in the Receiver Framework, which are as follows:
Method
remove
Method description
Called by the receiver when it detects a fatal condition. The receiver should only call this method if it cannot continue receiving. The Framework marks this receiver for removal and returns immediately. Later an internal WBI-C component calls the stopReceiving method on the receiver object.
Syntax
public void remove(String transportType) throws BCGReceiverException
Parameters
Method
preProcess
Method description
Called by the receiver to do the preprocessing of the document based on what pre-processing handlers, either Connect-supplied or user-defined, have been specified for this target via the Console. The Framework executes these handlers by passing the request document as input. The processed document returned by one handler is fed as an input to the second handler and so on. Handlers are called in the order specified in the Console target configuration screen. The resultant documents are returned as an array.
Syntax
public ReceiverDocumentInterface[] preProcess( String transportType, String target, ReceiverDocumentInterface request) throws BCGReceiverException
Parameters
Method
syncCheck
Method description
Called by receiver to access the list of Console configured syncCheck handlers, including user-provided handlers. The Framework will iterate through the list until it finds an appropriate handler. True indicates that the request is synchronous. False indicates that the request is configured to be asynchronous or that there are no syncCheck handlers configured for this receiver, which indicates that the request should be handled asynchronously.
Syntax
public boolean syncCheck(String transportType, String target, ReceiverDocumentInterface request) throws BCGReceiverException
Parameters
Method
postProcess
Method description
In the case of a synchronous request, the receiver calls the Framework to do the post processing of the response document based on which post -processing handlers, either Connect-supplied or user-defined, have been specified for this target via the Console. The Framework executes these handlers by passing the response document as the input. The processed document returned by one handler is fed as an input to the second handler and so on. Handlers are called in the order specified in the Console target configuration screen The resultant documents are returned as an array.
Syntax
public ReceiverDocumentInterface[] postProcess( String receiverType, String target, ReceiverDocumentInterface request) throws BCGReceiverException
Parameters
Method
process
Method description
The main processing method. When it is called, the Framework generates a unique id (UUID) for the request and writes the data into the internally necessary file set in the appropriate input directory. It also sets the UUID on the request document. The method has three distinct signatures, depending on the type of processing (async, blocking sync, or non-blocking sync) required.
Note: The method takes only one request document at a time. If there are multiple documents as a result of pre-processing, it is the receiver's responsibility to iterate through the array and call process for each document.
Syntax
Async request
public void process(String transportType, ReceiverDocumentInterface request) throws BCGReceiverException
Blocking sync request
public void process(String transportType, ReceiverDocumentInterface request, ReceiverDocumentInterface response) throws BCGReceiverException
Non-blocking sync request
public void process(String transportType, ReceiverDocumentInterface request, ResponseCorrelation responseCorr) throws BCGReceiverException
Parameters
Method
setResponseStatus
Method description
Notifies the Framework of the status of the synchronous response document after it has been returned to the originating host
Syntax
public void setResponseStatus(String documentUUID, boolean status, String statusMessage) throws BCGReceiverException
Parameters