com.ibm.wbi
Interface ResponseToRequest

All Known Implementing Classes:
RequestEvent, ServiceResult

public interface ResponseToRequest

WBI Megs operate on a mixture structured and unstructured data. For example, with an HTTP transaction, the HTTP header fields comprise the structured data, and the stream comprises the unstructured data. It is possible to get this mixture of structured and unstructured data from many sources, including from the RequestEvent (the event used to invoke processing of the various Megs), and from a ServiceResult (the object returned by an ancillary request such as FetchUrl). This interface encapsulates this mixture concept, in order to make it possible to write generic functions which operate on a normal transaction (RequestEvent) and an ancillary ones (e.g., FetchUrl).


Method Summary
 MegInputStream getMegInputStream()
          Get the input stream to read the response from.
 MegReader getMegReader()
          Get the character stream to read the response from.
 RequestInfo getRequestInfo()
          Gets the RequestInfo.
 Transaction getTransaction()
          Gets the Transaction object.
 

Method Detail

getMegInputStream

public MegInputStream getMegInputStream()
Get the input stream to read the response from.
Returns:
The input stream to read the response from.

getMegReader

public MegReader getMegReader()
                       throws java.io.UnsupportedEncodingException,
                              com.ibm.wbi.NotCharDataException
Get the character stream to read the response from.
Returns:
The Reader to read the response from.

getTransaction

public Transaction getTransaction()
Gets the Transaction object.
Returns:
Transaction objects assciated with this result.

getRequestInfo

public RequestInfo getRequestInfo()
Gets the RequestInfo.
Returns:
RequestInfo associated with this result.