SenderResult

The SenderResult object is created by the sender, based on this provided class. It holds meta-information on the status of the request business document, and, in the case of a synchronous flow, a reference to the File object containing the response document. It contains the following methods:

Method

addEvent

Method description

Adds an event to the SenderResult object

Syntax

public void addEvent(EventInfo eventInf)

Parameters

EventInfo
A specialized class from the com.ibm.bcg.bcgdk.common package, used to hold event information throughout the WebSphere Partner Gateway system. The addEvent method implementation only accepts EventInfo as a single parameter, not as an array. EventInfo is documented in the Workflow API chapter under From com.ibm.bcg.bcgdk.common.

Method

getEvents

Method description

Retrieves the events set in this object

Syntax

public EventInfo[] getEvents()

Parameters

None

Method

setSendStatus

Method description

Sets the delivery status. which can be success or failure based on transmission status.

Syntax

public void setSendStatus(String status)

Parameters

status
The appropriate status

Method

getSendStatus

Method description

Retrieves the delivery status

Syntax

public String getSendStatus()

Parameters

None

Method

setResponseDocument

Method description

Sets the file that holds the response document.

Syntax

public void setResponseDocument(File responseFile)

Parameters

responseFile
The File object where the response document is stored

Method

getResponseDocument

Method description

Retrieves the File object which holds the response document

Syntax

public File getResponseDocument()

Parameters

None

Method

setTransportStatusCode

Method description

Sets the transport return status code (like HTTP 200 OK)

Syntax

public void setTransportStatusCode(Object transportStatusCode)

Parameters

transportStatusCode
The status code

Method

getTransportStatusCode

Method description

Retrieves the transport return status code

Syntax

public Object getTransportStatusCode()

Parameters

None

Method

setTransportHeaders

Method description

Sets these headers upon receiving a synchronous response.

Syntax

public void setTransportHeaders(HashMap transportHeaders)

Parameters

transportHeaders
The HashMap that contains the transport headers

Method

getTransportHeaders

Method description

Retrieves the transport headers set by the sender

Syntax

public HashMap getTransportHeaders()

Parameters

None

Method

setAttribute

Method description

Sets attributes specific to WebSphere Partner Gateway. These attributes contain headers specific to senders. They are used by the Framework as input into the metadata file: delivery duration, transport status description, and so forth.

Syntax

public void setAttribute(String name, Object obj)

Parameters

name
The name of the object that stores the attributes
obj
The object

Method

getAttribute

Method description

Retrieves the attributes specific to WebSphere Partner Gateway

Syntax

public Object getAttribute()

Parameters

None

Method

getAttributes

Method description

Retrieves HashMap of all attributes set

Syntax

 getAttributes()

Parameters

None

Copyright IBM Corp. 2003, 2005