ReceiverInterface

Each receiver must implement this interface. It has the following methods:

Method

init

Method description

Initializes the receiver, based on the contents of the ReceiverConfig object

Syntax

public void init (Context context, ReceiverConfig config)
       throws BCGReceiverException

Parameters

context
Runtime information such as temp directory path

config
Configuration details as specified in the Console

Method

refreshConfig

Method description

Called by the Receiver Framework if and when it detects changes in the configuration of this receiver

Syntax

public void refreshConfig(ReceiverConfig config)
              throws BCGReceiverException

Parameters

config
An object that carries configuration details as specified in the Console

Method

startReceiving

Method description

Called by the Receiver Framework in its thread. Once this method is called, the receiver can begin receiving documents. If receiver is of the callback type, it will start processing callbacks in its own thread only after this point. This method should return quickly.

Note: The receiver is responsible for its own thread management.

Syntax

public void startReceiving()
             throws BCGReceiverException

Parameters

None.

Method

processResponse

Method description

In the case of non-blocking synchronous requests, called by the Receiver Framework when the response document has returned from Document Manager. The call comes on a Framework (or internal class) thread. The receiver should return this call quickly.

Syntax

public void processResponse(ResponseCorrelation respCorr,
                       ReceiverDocumentInterface response)
             throws BCGReceiverException

Parameters

respCorr
An object which contains the information needed to sync the response document to the original request document

response
The response document

Method

stopReceiving

Method description

Called by a WBI-C internal component. This method should return quickly. Once the method has been called, receiver should stop receiving documents and perform cleanup. Occurs:

Syntax

public void stopReceiving()
              throws BCGReceiverException

Parameters

None

Copyright IBM Corp. 2003, 2004