Main Page Class Hierarchy Compound List Compound Members TaskInputHandle Class Reference
Will be returned to the client once a message has been sent to the system. More...
Public Types
enum SubmissionState { SubmitStateUnknown = 1, SubmitPending, SubmitCompleted, SubmitFailed } Public Methods
const char * getId (void) const throw (SoamException) Get the ID of a Task returned by SOAM. SubmissionState waitForSubmissionComplete (long timeoutInSeconds=globalConst(TimeoutInfinite), bool throwOnSubmissionFailure=false) const throw (SoamException) Waits for message submission to complete. SubmissionState getSubmissionState () const throw (SoamException) Get the current state of submission. SoamException * getException () const throw (SoamException) Returns the exception if the message submission was unsuccessful. Friends
class Session Detailed Description
Will be returned to the client once a message has been sent to the system.The TaskInputHandle object will host a task ID returned by SOAM, which could be used by the client to identify the response from SOAM.
NOTE:
1. 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.
2. If any of the methods of this class are called after the main(...) method exits, the client or service process may behave in an undefined manner (for example, hang or terminate abnormally).
- See also:
- TaskInputHandlePtr , Session::sendTaskInput , TaskOutputHandle
Member Enumeration Documentation
enum SubmissionState Member Function Documentation
const char* getId ( void ) const throw (SoamException)
Get the ID of a Task returned by SOAM.
Retrieves the ID associated with the task which was created by the system when a message is sent. This task ID could be saved and compared with the task ID got from a TaskOutputHandle in the same session when fetching messages from SOAM, to match the input from client and output from the service.
- Returns:
- a Task ID.
- Exceptions:
SoamException
SubmissionState waitForSubmissionComplete ( long timeoutInSeconds = globalConst(TimeoutInfinite), bool throwOnSubmissionFailure = false ) const throw (SoamException)
Waits for message submission to complete.
Blocks the calling thread until the message associated with this handle has either reached a final state or the timeout (in seconds) has expired.
- Parameters:
timeoutInSeconds [IN] - The timeout in seconds. If not specified, the timeout will be "infinite", in which case the method will block until a final state has been reached (i.e. SubmitCompleted/SubmitFailed). The valid range of the values for timeout is 0 - 31,556,926 seconds, -1 = infinite. throwOnSubmissionFailure [IN] - When set to true the method will throw an exception if the submission ends in failure. When set to false the method will simply return the final state. By default, this value is "false".
- Returns:
- The current state of the submission.
- Exceptions:
SoamException
- See also:
- TaskInputHandle::SubmissionState
SubmissionState getSubmissionState ( ) const throw (SoamException)
Get the current state of submission.
- Returns:
- The current submission state of the message associated with this handle.
- Exceptions:
SoamException
- See also:
- TaskInputHandle::SubmissionState
SoamException* getException ( ) const throw (SoamException)
Returns the exception if the message submission was unsuccessful.
This method will retrieve the attached exception and will only be valid if there was a failure while submitting the message to the Middleware. If submission of the message is successful or is still pending and this method is called, an exception will be thrown.
- Returns:
- The exception object associated with this handle.
- Exceptions:
SoamException
Date Modified: 28 Apr 2011
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.