Package: com.appistry.fabric
Interface IFabric
Methods
getAddress
This method returns the MCAST address to which the client submits request to the fabric.
| Return Value |
| String |
Request Region MCAST address, this must be identical to the fabric-address in the [addr.cfg] file; default is 239.255.0.1 |
getPort
The method returns the port to which the client submits requests to the fabric.
| Return Value |
| int |
request region port |
getEncryption
Encryption getEncryption()
This method returns the encryption type. Valid values are Encryption.SSL and Encryption.NONE. No encryption is the default.
| Return Value |
| Encryption |
encryption type |
getMcastTTL
This method returns the time to live parameter for multicast packets used by the fabric API.
| Return Value |
| int |
time to live parameter |
getCacheRefreshTimeout
int getCacheRefreshTimeout()
This method returns the amount of time, in seconds, the fabric can take to create a list of workers available for processing requests.
| Return Value |
| int |
the amount of time, in seconds, the fabric can take to create a list of workers available for processing requests |
getCacheRefreshInterval
int getCacheRefreshInterval()
This method returns the amount of time the fabric waits before refreshing the list of workers available for processing requests.
| Return Value |
| int |
amount of time, in seconds, the fabric waits before refreshing the list of workers available for processing requests; 0 indicates the list is not created |
ping
This method verifies the client can connect to the fabric.
| Return Value |
| Boolean |
TRUE if the can connect to the fabric, FALSE if the can not connect to the fabric |
pingApplication
Boolean pingApplication (String applicationName,
String processFlowName)
This method verifies the client can connect to the fabric, and that the application and process flow are loaded on the fabric.
| Parameters |
| String |
name of the application requested |
| String |
name of the process flow requested |
| Return Value |
| Boolean |
TRUE if the can connect to the fabric, and the application and process flow are loaded, FALSE if the can not connect to the fabric |
execute
void execute(FabricRequest request)
This method connects to the fabric and executes the specified process flow in a synchronous manner.
| Parameters |
| FabricRequest |
request object passed into the method |
recover
This method attempts to recover a lost process flow's result from the fabric in a synchronous manner. Since the process flow results are not available until the process flow has completed, recover waits until the recovery completes or the specified timeout is met. If the request object that generated the original fabric request was destroyed, you must create a new request object and set the new request object's request ID to the destroyed request object's request ID.
| Return Value |
| IFabricRequest |
a recovered FabricRequest object |
IFabricRequest recover(String requestId)
| Parameters |
| String |
ID of request to be recovered |
or
IFabricRequest recover(String requestId,
int timeoutInSeconds)
| Parameters |
| String |
ID of request to be recovered |
| int |
amount of time to wait before attempting to recover a lost process flow result |
or
IFabricRequest recover(String requestId,
String username,
String password,
int timeoutInSeconds)
| Parameters |
| String |
ID of request to be recovered |
| String |
user name |
| String |
user password |
| int |
amount of time to wait before attempting to recover a lost process flow result |
submit
void submit(FabricRequest request)
This method connects to the fabric and submits the specified process flow in an asynchronous manner. Retrieve the result using the waitAny method.
| Parameters |
| FabricRequest |
request object passed into the function |
submitCorrelated
void submitCorrelated(FabricRequest request)
This method connects to the fabric and submits the specified process flow in an asynchronous manner. Retrieve the result using the waitCorrelated method.
| Parameters |
| FabricRequest |
request object passed into the function |
waitAny
This method specifies the fabric waits for any request submitted asynchronous by the submit or submitRecover methods. These requests may return in any order from the fabric.
| Return Value |
| FabricRequest |
a FabricRequest object returned asynchronously after being submitted to the fabric using submit or submitRecover |
or
FabricRequest waitAny(int timeoutInMilliseconds)
| Parameters |
| int |
amount of item time, in milliseconds, to wait for a result; FabricProperties.Infinite indicates infinite |
waitCorrelated
This method specifies the fabric waits for a particular request's result that was submitted using the submitCorrelated or submitRecoverCorrelated method.
| Return Value |
| FabricRequest |
FabricRequest object returned asynchronously after being submitted to the fabric using submitCorrelated or submitRecoverCorrelated |
Boolean waitCorrelated(FabricRequest request)
| Parameters |
| FabricRequest |
request object passed into the function |
or
Boolean waitCorrelated(FabricRequest request, int timeoutInMilliseconds)
| Parameters |
| FabricRequest |
request object passed into the function |
| int |
amount of time, in milliseconds, to wait for a request result; FabricProperties.Infinite indicates infinite |
| boolean |
TRUE if the wait succeeded and the request was returned, FALSE If the request was not returned |
submitRecover
This method submits a recovery request for a lost process flow's result in an asynchronous manner. After submitting the recovery request, you must wait for the results using the [waitAny] method. If the request object that generated the original fabric request was destroyed, you must create a new request object and set the new request object's request ID to the destroyed request object's request ID.
void submitRecover(String requestId)
| Parameters |
| String |
ID of request to be recovered |
or
void submitRecover(String requestId,
int timeoutInSeconds)
| Parameters |
| String |
ID of request to be recovered |
| int |
amount of time to wait before attempting to recover a lost process flow result |
or
void submitRecover(String requestId,
String username,
String password,
int timeoutInSeconds)
| Parameters |
| String |
ID of request to be recovered |
| String |
user name |
| String |
user password |
| int |
amount of time to wait before attempting to recover a lost process flow result |
submitRecoverCorrelated
This method submits the recovery request for a lost process flow's result in an asynchronous manner. After submitting the recovery request, you must wait for the results using the waitCorrelated method. If the request object that generated the original fabric request was destroyed, you must create a new request object and set the new request object's request ID to the destroyed request object's request ID.
void submitRecoverCorrelated(String requestId)
| Parameters |
| String |
ID of request to be recovered |
or
void submitRecoverCorrelated(String requestId,
int timeoutInSeconds)
| Parameters |
| String |
ID of request to be recovered |
| int |
amount of time to wait before attempting to recover a lost process flow result |
or
void submitRecoverCorrelated(String requestId,
String username,
String password,
int timeoutInSeconds)
| Parameters |
| String |
ID of request to be recovered |
| String |
user name |
| String |
user password |
| int |
amount of time to wait before attempting to recover a lost process flow result |