Visit Platform at http://www.platform.com

Main Page   Class Hierarchy   Compound List   Compound Members  

TaskOutputHandle Class Reference

Hosts a task ID, a message response (if any), and an exception (if any) from SOAM. For synchronous message retrieval, an enumeration of TaskOutputHandles will be returned from the Session::fetchTaskOutput() method. You can enumerate through this object by calling EnumItems::getNext. For asynchronous message retrieval, a TaskOutputHandle is passed as an argument to the SessionCallback::onResponse handler for every task that has completed. More...

List of all members.


Public Methods

const char * getId (void) const throw (SoamException)
 Gets the task ID of a TaskOutputHandle returned by SOAM.

bool isSuccessful (void) const throw (SoamException)
 Check if a message has been successfully processed by SOAM.

void getMessage (Message *outputMessage) const throw (SoamException)
 Get a response from SOAM service.

void populateTaskOutput (Message *outputMessage) const throw (SoamException)
 Retrieves the output associated with the task.

SoamExceptiongetException () const throw (SoamException)
 Returns the exception if the task was unsuccessful.


Friends

class EnumItems
class SoamFactory

Detailed Description

Hosts a task ID, a message response (if any), and an exception (if any) from SOAM. For synchronous message retrieval, an enumeration of TaskOutputHandles will be returned from the Session::fetchTaskOutput() method. You can enumerate through this object by calling EnumItems::getNext. For asynchronous message retrieval, a TaskOutputHandle is passed as an argument to the SessionCallback::onResponse handler for every task that has completed.

NOTE: It is always best to access a pointer to this type of object through the appropriate smart pointer type instead of using a raw pointer.

See also:
TaskOutputHandlePtr , Session::fetchTaskOutput , EnumItems::getNext , TaskInputHandle , SessionCallback::onResponse


Member Function Documentation

const char* getId void    const throw (SoamException)
 

Gets the task ID of a TaskOutputHandle returned by SOAM.

This task ID could be compared with the task ID got from a TaskInputHandle in the same session when sending messages to SOAM, to match the input from client and output from the service.

Returns:
a TaskOutputHandle ID.
Exceptions:
SoamException 
See also:
Session::sendTaskInput , Session::fetchTaskOutput , TaskInputHandle::getId

bool isSuccessful void    const throw (SoamException)
 

Check if a message has been successfully processed by SOAM.

Gives an indication if a task was successfully processed by the service instance.

Returns:
TRUE to indicate the request has been successfully processed by SOAM, or FALSE if the request was not successfully processed.
Exceptions:
SoamException 

void getMessage Message   outputMessage const throw (SoamException)
 

Get a response from SOAM service.

Deprecated:
This method was deprecated in Symphony 3.1, use
void TaskOutputHandle::populateTaskOutput (Message& outputMessage) instead.
Deserializes the returned message (if any) into the message output object provided by the client. If the task failed and this method is called, an exception will be thrown.
Parameters:
outputMessage  [OUT] a response message from the SOAM service.
Exceptions:
SoamException 
See also:
Message::onDeserialize

void populateTaskOutput Message   outputMessage const throw (SoamException)
 

Retrieves the output associated with the task.

Deserializes the returned message (if any) into the message output object provided by the client. If the task failed and this method is called, an exception will be thrown.

Parameters:
outputMessage  [OUT] a response message from the SOAM service.
Exceptions:
SoamException 
See also:
Message::onDeserialize

SoamException* getException   const throw (SoamException)
 

Returns the exception if the task was unsuccessful.

This method will retrieve the attached exception and will only be valid if the task was unsuccessful. If the task was successful and this method is called an exception will be thrown.

Returns:
an exception object generated by SOAM or service.
Exceptions:
SoamException 


     
Date Modified: 11 Nov 2009
Platform Support: support@platform.com
Platform Information Development: doc@platform.com

Platform Computing. Accelerating Intelligence(TM).
Copyright © 2001-2009 Platform Computing Corporation. All rights reserved.