com.ibm.wsspi.sibx.mediation.flow.action
Interface FlowActionFactory


public interface FlowActionFactory

This interface supports creation of appropriate FlowAction objects as a result of a mediation flow.

Each execution of a mediation flow uses a separate, single instance of this factory class. The factory is responsible for enforcing invocation policy for the Callouts, Result and Fault resulting from a request flow.


Field Summary
static java.lang.String $sccsid
           
static java.lang.String COPYRIGHT
           
 
Method Summary
 void complete()
          This method indicates that the set of FlowActions is complete and that they should be completed if deferred completion was set.
 FlowAction create(Callout callout)
          Create a FlowAction of the appropriate type for the given message.
 FlowAction create(Fault fault)
          Create a FlowAction of the appropriate type for the Fault.
 FlowAction create(InlineCall call)
          Create a FlowAction of the appropriate type for the InlineCall.
 FlowAction create(Result r)
          Create a FlowAction of the appropriate type for the Result.
 long getAsyncTimeout()
          Gets the timeout time for outbound async requests.
 java.lang.String getComponentName()
          Gets the component name for this FlowAction factory.
 java.lang.String getModuleName()
          Gets the module name for this FlowAction factory.
 com.ibm.wsspi.sca.message.Message getResultMessage()
          Gets the result message.
 com.ibm.websphere.sibx.smobo.ServiceMessageObject getSMO()
          Gets the SMO message that represents the request or the response.
 FlowAction locate(java.lang.String key, java.lang.String moduleName)
          Locate the FlowAction with the given key.
 void setFault(com.ibm.websphere.sibx.smobo.ServiceMessageObject fault)
          Sets the message to be a fault containing the given SMO.
 void setReply(com.ibm.websphere.sibx.smobo.ServiceMessageObject reply)
          Sets the message to be a reply containing the given SMO.
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

$sccsid

public static final java.lang.String $sccsid
See Also:
Constant Field Values
Method Detail

create

public FlowAction create(Callout callout)
                  throws FlowActionPolicyException,
                         FlowActionException
Create a FlowAction of the appropriate type for the given message.

Parameters:
callout - The Callout.
Returns:
The FlowAction instance.
Throws:
FlowActionPolicyException - If the invocation policy is violated.
FlowActionException - An error occurred creating the FlowAction instance.

create

public FlowAction create(Result r)
                  throws FlowActionPolicyException,
                         FlowActionException
Create a FlowAction of the appropriate type for the Result.

Parameters:
r - The Result.
Returns:
The FlowAction instance.
Throws:
FlowActionPolicyException - If the invocation policy is violated.
FlowActionException - An error occurred creating the FlowAction instance.

create

public FlowAction create(Fault fault)
                  throws FlowActionPolicyException,
                         FlowActionException
Create a FlowAction of the appropriate type for the Fault.

Parameters:
fault - The Fault.
Returns:
The FlowAction instance.
Throws:
FlowActionPolicyException - If the invocation policy is violated.
FlowActionException - An error occurred creating the FlowAction instance.

create

public FlowAction create(InlineCall call)
                  throws FlowActionPolicyException,
                         FlowActionException
Create a FlowAction of the appropriate type for the InlineCall.

Parameters:
call - The InlineCall.
Returns:
The FlowAction instance.
Throws:
FlowActionPolicyException - If the invocation policy is violated.
FlowActionException - An error occurred creating the FlowAction instance.

locate

public FlowAction locate(java.lang.String key,
                         java.lang.String moduleName)
                  throws FlowActionException
Locate the FlowAction with the given key.

This removes the mapping from key to FlowAction.

Parameters:
key - The key that the FlowAction was stored with.
moduleName - The name of the module.
Returns:
The FlowAction instance.
Throws:
FlowActionException - An error occurred locating the FlowAction instance.

complete

public void complete()
              throws FlowActionException
This method indicates that the set of FlowActions is complete and that they should be completed if deferred completion was set.

Throws:
FlowActionException - An error occurred making an invocation.

setReply

public void setReply(com.ibm.websphere.sibx.smobo.ServiceMessageObject reply)
              throws FlowActionException
Sets the message to be a reply containing the given SMO.

The message could be the original request message or the reply message.

Parameters:
reply - The SMO reply message.
Throws:
FlowActionException - An error occurred setting the reply.

setFault

public void setFault(com.ibm.websphere.sibx.smobo.ServiceMessageObject fault)
              throws FlowActionException
Sets the message to be a fault containing the given SMO.

The message could be the original request message or the reply message.

Parameters:
fault - The SMO fault message.
Throws:
FlowActionException - An error occurred setting the reply.

getAsyncTimeout

public long getAsyncTimeout()
Gets the timeout time for outbound async requests.

Returns:
The timeout.

getComponentName

public java.lang.String getComponentName()
Gets the component name for this FlowAction factory.

Returns:
The component name.

getModuleName

public java.lang.String getModuleName()
Gets the module name for this FlowAction factory.

Returns:
The module name.

getResultMessage

public com.ibm.wsspi.sca.message.Message getResultMessage()
Gets the result message.

This returns the original request transformed into a result, whether the flow was called synchronously or asynchronously.

In the asynchronous case for the request message, the result returned has an empty body. In all other cases the result contains the reply body.

Returns:
The result message.

getSMO

public com.ibm.websphere.sibx.smobo.ServiceMessageObject getSMO()
Gets the SMO message that represents the request or the response.

Returns:
The SMO message.