Dashboard > Appistry EAF v3.8 > ... > Java Client API > Fabric
Log In   View a printable version of the current page.  
  Fabric

Package: com.appistry.fabric

Class Fabric

Implements

Fabric implements IFabric

Methods

Fabric

This the Fabric API object constructor.

Return Value
Fabric a new Fabric API object
Fabric(String fabricAddress,
       int fabricPort)
Parameters
String Fabric MCAST address
int Fabric request port

or

Fabric(String fabricAddress,
       int fabricPort,
       Encryption encryption)
Parameters
String Fabric MCAST address
int Fabric request port
String the encryption type to if enabled on the fabric; valid values are Encryption.SSL or Encryption.NONE

or

Fabric(String fabricAddress,
       int fabricPort,
       int mcastTTL)
Parameters
String Fabric MCAST address
int Fabric request port
int MCAST time to live value

or

Fabric(String fabricAddress,
       int fabricPort,
       int mcastTTL,
       Encryption encryption)
Parameters
String Fabric MCAST address
int Fabric request port
int MCAST time to live value
String the encryption type to if enabled on the fabric; valid values are Encryption.SSL or Encryption.NONE

or

Fabric(String fabricAddress,
       int fabricPort,
       int mcastTTL,
       Encryption encryption,
       int cacheRefreshInterval,
       int casheRefreshTimeout)
Parameters
String Fabric MCAST address
int Fabric request port
int MCAST time to live value
String the encryption type to if enabled on the fabric; valid values are Encryption.SSL or Encryption.NONE
int the 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 and requests are submitted asynchronously
int the amount of time, in seconds, the fabric can take to create a list of workers available for processing requests

or

Fabric(FabricProperties properties)
Parameters
FabricProperties a FabricProperties object which encapsulates the default fabric API settings. The default settings can be overridden by constructing a FabricProperties object and passing it a Properties object with name/value pairs to override the defaults. Valid values are "fabric-address", "request-port", "mcast-ttl", "tcp-idle-connection-timeout", "cache-refresh-interval", "cache-refresh-timeout", "tcp-keep-alive-interval", "tcp-inactive-read-timeout", "encryption", "tcp-connection-timeout"

getAddress

String 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

int 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

int 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

Boolean 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
FabricRequest waitAny()

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

getKeepaliveSendInterval

int getKeepaliveSendInterval()

Thie method returns maximum amount of time, in milliseconds, the client waits to receive a transmission over the TCP connection before sending a keepalive ping to the fabric. The client and fabric may have different values. In this is situation, the smaller of the two values is used. If the fabric has a smaller value, that value overrides this value.

Return Value
int maximum amount of time, in milliseconds, the client waits to receive a transmission over the TCP connection before sending a keepalive ping to the fabric; the default it 10000

getKeepaliveReadTimeout

int getKeepaliveReadTimeout()

This method returns the maximum amount of time, in milliseconds, the client waits for a response from a keepalive ping. If the timeout expires, the connection is considered disconnected. The client and fabric may have different values. In this is situation, the smaller of the two values is used. If the fabric has a smaller value, that value overrides this value.

Return Value
int maximum amount of time, in milliseconds, the client waits for a response from a keepalive ping; the default is 15000