Namespace: Appistry.FabricAPI
Class Fabric
Properties
| string IPAddress |
This property specifies the MCAST address to which the client submits request to the fabric. The MCAST address must be identical to the request-region-group value in the addr.cfg file. The default is 239.255.0.1. Only the get accessor is available for this property. |
| int Port |
This property specifies the port to which the client submits requests to the fabric. The port must be identical to the request-region-port value in the addr.cfg file. The default is 31000. Only the get accessor is available for this property. |
| int McastTTL |
This property specifies the time to live parameter for multicast packets used by the fabric API. Only the get accessor is available for this property. |
| Encryption Encryption |
This property specifies the encryption type. The available encryption types are NONE to indicate encryption is not enabled or SSL to indicate SSL encryption. The set and get accessors are available for this property. |
| int CacheRefreshInterval |
This property specifies the amount of time the fabric waits before refreshing the list of workers available for processing requests. Only the get accessor is avaliable for this property. |
| int ConnectionTimeout |
This property specifies the amount of time the client waits for an established TCP connection after initiating the connection. If the timeout expires before the connection is established, the connection attempt is considered failed. Only the get accessor is available for this property. |
| int KeepaliveSendInterval |
This property specifies the amount of time 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. Only the get accessor is available for this property. |
| KeepaliveReadTimeout |
This property specifies the amount of time 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. Only the get accessor is available for this property. |
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,
int mcastTTL)
| Parameters |
| string |
Fabric MCAST address |
| int |
Fabric request port |
| int |
MCAST time to live value |
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,
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 cacheRefreshIntervalInSeconds,
int cacheRefreshTimeoutInSeconds)
| 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 |
| int |
the amount of time, in seconds, the fabric can take to create a list of workers available for processing requests |
or
Fabric(IDictionary fabricProperties)
| Parameters |
| IDictionary |
a IDictionary object which holds name/value pairs to override the fabric API defaults. Valid names for values are
"fabric-address", "request-port", "mcast-ttl", "encryption", "cache-refresh-interval", "cache-refresh-timeout", "tcp-connect-timeout", "tcp-keep-alive-interval", "tcp-inactive-read-timeout". |
| Exceptions |
InvalidOperationsException |
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.
| 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 |
| Parameters |
| string |
application name |
| string |
process flow name |
| Exceptions |
InvalidOperationsException |
Execute
void Execute(FabricRequest request)
This method connects to the fabric and executes the process flow specified in the FabricRequest in a synchronous manner.
| Parameters |
| FabricRequest |
fabric request object |
| Exceptions |
InternalErrorException
InvalidOperationException
ResourecBusyException
SecurityException |
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 |
| FabricRequest |
a recovered FabricRequest object |
FabricRequest Recover(string requestId)
| Parameters |
| string |
unique request identifer |
or
FabricRequest Recover(string requestId,
int timeoutInSeconds)
| Parameters |
| string |
unique request identifer |
| int |
the amount of time, in seconds, the fabric attempts to retrieve the results of the lost process |
or
FabricRequest Recover(string requestId,
string username,
string password,
int timeoutInSeconds)
| Parameters |
| string |
unique request identifer |
| string |
user name |
| string |
user password |
| int |
the amount of time, in seconds, the fabric attempts to retrieve the results of the lost process |
| Exceptions |
InvalidOperationException
ResourceBusyException |
Submit
void Submit(FabricRequest request)
This method connects to the fabric and submits the specified process flow in an asynchronous manner. Retrieve the request using the Wait method.
| Parameters |
| FabricRequest |
fabric request object |
| Exceptions |
InvalidOperationException
ResourceBusyException
SecurityException |
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 |
fabric request object |
| Exceptions |
InvalidOperationException
ResourceBusyException
SecurityException |
Wait
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 |
| Boolean |
TRUE if the wait succeeded and the request was returned, FALSE if the request was not returned |
Boolean Wait(out FabricRequest request)
| Parameters |
| FabricRequest |
fabric request object populated by call |
or
Boolean Wait(out FabricRequest request,
int timeoutInMilliseconds)
| Parameters |
| FabricRequest |
fabric request object populated by call |
| int |
the maximum amount of time, in milliseconds, the fabric waits for a request result before timing out; the value Fabric.Infinite indicates the fabric waits infinitely |
| Exceptions |
InternalErrorException |
WaitCorrelated
This method specifies the fabric waits for a particular request's result that was submitted using the SubmitCorrelated or SubmitRecoverCorrelated method.
| Return Value |
| Boolean |
TRUE if the wait succeeded and the request was returned, FALSE if the request was not returned |
Boolean WaitCorrelated(string requestId,
out FabricRequest request)
| Parameters |
| string |
unique request identifier |
| FabricRequest |
fabric request object populated by call |
or
Boolean WaitCorrelated(string requestId,
out FabricRequest request
int timeoutInMilliseconds)
| Parameters |
| string |
unique request identifier |
| FabricRequest |
fabric request object populated by call |
| int |
the maximum amount of time, in milliseconds, the fabric waits for a request result before timing out; the value Fabric.Infinite indicates the fabric waits infinitely |
| Exceptions |
InternalErrorException |
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 Wait 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 |
unique request identifer |
or
void SubmitRecover(string requestId,
int timeoutInSeconds)
| Parameters |
| string |
unique request identifer |
| int |
the amount of time, in seconds, the fabric attempts to retrieve the results of the lost process |
or
void SubmitRecover(string requestId,
string username,
string password,
int timeoutInSeconds)
| Parameters |
| string |
unique request identifer |
| string |
user name |
| string |
user password |
| int |
the amount of time, in seconds, the fabric attempts to retrieve the results of the lost process |
| Exceptions |
ResourceBusyException
SecurityException |
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 |
unique request identifer |
or
void SubmitRecoverCorrelated(string requestId,
int timeoutInSeconds)
| Parameters |
| string |
unique request identifer |
| int |
the amount of time, in seconds, the fabric attempts to retrieve the results of the lost process |
or
void SubmitRecoverCorrelated(string requestId,
string username,
string password,
int timeoutInSeconds)
| Parameters |
| string |
unique request identifer |
| string |
user name |
| string |
user password |
| int |
the amount of time, in seconds, the fabric attempts to retrieve the results of the lost process |
| Exception |
ResourceBusyException
SecurityException |
|
|