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

Platform Symphony 5.0 Java API Reference

com.platform.symphony.soam
Interface TaskInputHandle


public interface TaskInputHandle

Will be returned to the client once a task input has been sent to the middleware, and used by the client to match a task input to the corresponding task response.

See Also:
Session.sendTaskInput(Serializable), Session.sendTaskInput(Message), TaskOutputHandle

Field Summary
static int SUBMIT_COMPLETED
          The message has been successfully dispatched to the Middleware.
static int SUBMIT_FAILED
          The dispatch of the message was un-successful.
static int SUBMIT_PENDING
          The message has been dispatched and a confirmation of receipt is pending from the Middleware.
static int SUBMIT_STATE_UNKNOWN
          No information is available about the state at this time.
 
Method Summary
 SoamException getException()
          Retrieves the attached exception if the message submission was unsuccessful.
 java.lang.String getId()
          Retrieves the identifier associated with the task, which was created by the middleware when a task input was sent.
 int getSubmissionState()
          Get the current state of submission.
 int waitForSubmissionComplete()
          Waits for message submission to complete.
 int waitForSubmissionComplete(int timeoutInSeconds)
          Waits for message submission to complete.
 int waitForSubmissionComplete(int timeoutInSeconds, boolean throwOnSubmissionFailure)
          Waits for message submission to complete.
 

Field Detail

SUBMIT_STATE_UNKNOWN

static final int SUBMIT_STATE_UNKNOWN
No information is available about the state at this time.

See Also:
Constant Field Values

SUBMIT_PENDING

static final int SUBMIT_PENDING
The message has been dispatched and a confirmation of receipt is pending from the Middleware.

See Also:
Constant Field Values

SUBMIT_COMPLETED

static final int SUBMIT_COMPLETED
The message has been successfully dispatched to the Middleware.

See Also:
Constant Field Values

SUBMIT_FAILED

static final int SUBMIT_FAILED
The dispatch of the message was un-successful.

See Also:
Constant Field Values
Method Detail

getId

java.lang.String getId()
                       throws SoamException
Retrieves the identifier associated with the task, which was created by the middleware when a task input was sent.

Within the scope of a Session, this task ID can be saved and compared with the task ID from a TaskOutputHandle to match a task input to the corresponding task response.

Returns:
The identifier for the task
Throws:
SoamException
See Also:
Session.sendTaskInput(Serializable), Session.sendTaskInput(Message), TaskOutputHandle.getId()

getSubmissionState

int getSubmissionState()
                       throws SoamException
Get the current state of submission.

Returns:
The current state of the submission associated with this handle.
Throws:
SoamException

getException

SoamException getException()
                           throws SoamException
Retrieves the attached 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. The current state of the submission can be verified with a call to TaskInputHandle.getSubmissionState.

Returns:
The exception object associated with this handle.
Throws:
SoamException
See Also:
getSubmissionState()

waitForSubmissionComplete

int waitForSubmissionComplete()
                              throws SoamException
Waits for message submission to complete.

This method will block the calling thread until the message associated with this handle has reached a final state (i.e. SUBMIT_COMPLETED/SUBMIT_FAILED).

Returns:
The current state of the submission.
Throws:
SoamException

waitForSubmissionComplete

int waitForSubmissionComplete(int timeoutInSeconds)
                              throws SoamException
Waits for message submission to complete.

This method will block the calling thread until the message associated with this handle has either reached a final state (i.e. SUBMIT_COMPLETED/SUBMIT_FAILED) or the timeout (in seconds) has expired.

Parameters:
timeoutInSeconds - The timeout in seconds. The valid range of the values for timeout is 0 - 31,556,926 seconds, -1 = infinite.
Returns:
The current state of the submission.
Throws:
SoamException

waitForSubmissionComplete

int waitForSubmissionComplete(int timeoutInSeconds,
                              boolean throwOnSubmissionFailure)
                              throws SoamException
Waits for message submission to complete.

This method will block the calling thread until the message associated with this handle has either reached a final state (i.e. SUBMIT_COMPLETED/SUBMIT_FAILED) or the timeout (in seconds) has expired.

Parameters:
timeoutInSeconds - The timeout in seconds. The valid range of the values for timeout is 0 - 31,556,926 seconds, -1 = infinite.
throwOnSubmissionFailure - 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.
Returns:
The current state of the submission.
Throws:
SoamException

Version 5.0
Date Modified: -DREL_DATE=Nov 11 2009
Platform Computing. Accelerating Intelligence(TM).
Copyright (C) 2001-2009 Platform Computing Corporation. All rights reserved.