OpenGroup::arm40::Provisional::transaction::IArmTransactionFactory Interface Reference
[ARM 4.0 Factories]

Provides methods to create instances of the classes in the OpenGroup.arm40.Provisional.transaction package. More...

Inheritance diagram for OpenGroup::arm40::Provisional::transaction::IArmTransactionFactory:
OpenGroup::arm40::Provisional::transaction::IArmInterface

List of all members.

Public Member Functions

IArmApplication newArmApplication (IArmApplicationDefinition definition, string group, string instance, string[] contextValues)
 Creates the IArmApplication object to which transaction instances are related.
IArmApplicationDefinition newArmApplicationDefinition (string name, IArmIdentityProperties identityProperties, IArmID id)
 Creates the IArmApplicationDefinition object that describes the metadata about an application.
IArmBlockCause newArmBlockCause ()
 Creates an IArmBlockCause.
IArmCorrelator newArmCorrelator (byte[] corrBytes)
 Creates a correlator from a byte array in the correct format.
IArmCorrelator newArmCorrelator (byte[] corrBytes, int offset)
 Creates a correlator from a byte array in the correct format.
IArmID newArmID (byte[] idBytes)
 Creates the objects that contain an immutable 16-byte ID.
IArmID newArmID (byte[] idBytes, int offset)
 Creates the objects that contain an immutable 16-byte ID.
IArmIdentityProperties newArmIdentityProperties (string[] identityNames, string[] identityValues, string[] contextNames)
 Creates an object that contains an immutable set of identity property names and values, and an immutable set of context property names.
IArmIdentityPropertiesTransaction newArmIdentityPropertiesTransaction (string[] identityNames, string[] identityValues, string[] contextNames, string uriValue)
 Creates an object that extends newArmIdentityProperties to also include a URI property, which is also immutable.
IArmTransaction newArmTransaction (IArmApplication app, IArmTransactionDefinition definition)
 Creates an object that represents an instance of a transaction.
IArmTransactionDefinition newArmTransactionDefinition (IArmApplicationDefinition app, string name, IArmIdentityPropertiesTransaction identityProperties, IArmID id)
 Creates an object that represents the metadata about a transaction.
IArmUser newArmUser (string name, IArmID id)
 Creates an ArmUser object that represents the user who invoked (directly or indirectly) the transaction.
bool SetErrorCallback (IArmErrorCallback errorCallback)
 Registers an error callback for objects created through this factory.

Detailed Description

An error callback method can be registered for objects created with this factory (see SetErrorCallback(IArmErrorCallback)

Semantics of the factory methods are provided in the description of the individual methods below.

IArmTransactionFactory is instantiated using a class loader. The actual name of the factory implementation class is obtained from the system property whose name is provided in the IArmTransactionFactoryConstants.propertyKey constant.

Error Handling Philosophy

If an invalid set of parameters is passed to any method, such as an offset that extends beyond the end of an array, an object is returned that may contain dummy data. For example, a null byte[] addressBytes parameter might result in creating an object with an address of all zeros. Different ARM implementations may handle the situation in different ways, but in all cases, they will return an object that is syntactically correct; that is, any of its methods can be invoked without causing an exception, even if the data may be at least partially meaningless. The GetErrorCode() method of each object can be used after it is created to test whether errors occurred. See IArmInterface for a more complete explanation.

IArmTransactionFactory also serves as the anchor point for an application-registered callback function. SetErrorCallback() is used to register a callback that will be called if any method of an object created by this factory object sets the error code to a negative value. The error code is retrieved using GetErrorCode(), defined in IArmInterface, the root for most interfaces in the ARM specification. The bool returned by SetErrorCallback() indicates whether the registration is accepted. If an ARM implementation does not support the callback function, it will return false. SetErrorCallback(null) unregisters any previously registered callback. Note that due to timing conditions or specifics of the ARM implementation, a previously registered callback may continue to be called for an indeterminate length of time after SetErrorCallback(null) is executed. For a broader discussion of error handling, refer to the ARM 4.0 Java Binding specification.


Member Function Documentation

IArmApplication OpenGroup::arm40::Provisional::transaction::IArmTransactionFactory::newArmApplication ( IArmApplicationDefinition  definition,
string  group,
string  instance,
string[]  contextValues 
)

definition is the only required non-null parameter.

IArmApplication

Parameters:
definition metadata describing the type of the ARM application. Must not be null.
group Name of the group the application belongs to. May be null.
instance Name this application instance is given. May be null.
contextValues An array of strings providing the value parts of (name,value) context properties. May be null.
Returns:
a new IArmApplication instance.
IArmApplicationDefinition OpenGroup::arm40::Provisional::transaction::IArmTransactionFactory::newArmApplicationDefinition ( string  name,
IArmIdentityProperties  identityProperties,
IArmID  id 
)

That is, the descriptive data that is the same for all instances of the same application. name is the only required non-null parameter.

IArmApplicationDefinition

Parameters:
name the name of the application type. A name should be chosen that is unique. Must not be null
identityProperties a set of properties contributing to the identity of the application definition. May be null. See newArmIdentityProperties
id An optional 16-byte ID associated with the identity of the application definition.
Returns:
a new IArmApplicationDefinition.
IArmBlockCause OpenGroup::arm40::Provisional::transaction::IArmTransactionFactory::newArmBlockCause (  ) 

It takes no parameters - all its properties are set via setter methods.

Returns:
a new IArmBlockCause.
Since:
ARM 4.1
IArmCorrelator OpenGroup::arm40::Provisional::transaction::IArmTransactionFactory::newArmCorrelator ( byte[]  corrBytes  ) 

No length field is passed to this method because ARM requires that the length of the correlator be found in the first two bytes (in network byte order) of the byte array. The correlator must be no longer than ArmConstants.ARM_CORR_MAX_LENGTH. If the correlator is longer than the ARM implementation supports, an IArmCorrelator object will be created, but it may contain dummy data, at the discretion of the ARM implementation.

IArmCorrelator

Parameters:
corrBytes a byte array containig correlator data.
Returns:
a new IArmCorrelator.
IArmCorrelator OpenGroup::arm40::Provisional::transaction::IArmTransactionFactory::newArmCorrelator ( byte[]  corrBytes,
int  offset 
)

See description of newArmCorrelator(byte[]) Since the start of the correlator bytes within the array is at position offset, the length of the correlator is taken from the bytes at offset and offset+1.

Parameters:
corrBytes a byte array containig correlator data.
offset start of the correlator bytes within the array.
Returns:
a new IArmCorrelator.
IArmID OpenGroup::arm40::Provisional::transaction::IArmTransactionFactory::newArmID ( byte[]  idBytes  ) 

Having 16-byte IDs accommodates some widely used IDs, such as the UUID (universally unique identifier) defined in the DCE and IETF standards. IArmID

Parameters:
idBytes a byte array containig ID data.
Returns:
a new IArmID.
IArmID OpenGroup::arm40::Provisional::transaction::IArmTransactionFactory::newArmID ( byte[]  idBytes,
int  offset 
)

See description of newArmID(byte[])

Parameters:
idBytes a byte array containig ID data.
offset start of the ID bytes within the array.
Returns:
a new IArmID.
IArmIdentityProperties OpenGroup::arm40::Provisional::transaction::IArmTransactionFactory::newArmIdentityProperties ( string[]  identityNames,
string[]  identityValues,
string[]  contextNames 
)

These properties describe identity properties that are common to all instances of an application or transaction.

The names and values are provided in arrays of strings. There can be up to twenty elements in each of the arrays. A null reference and a zero-length string are both treated as a null element. It is permissible to have null elements in the middle of the array. For example, it is permissible for the elements at indices 0 and 19 to be non-null and all the elements from indices 1 to 18 to be null. The arrays are position sensitive.

The identity property name and value arrays should contain the same number of elements at the same array indices; for each non-null name or value, there should be a corresponding non-null value or name, respectively, at the same array index. For any array index, if either the name or the value is null, both the name and the value are ignored.

The context property names are provided in this object. The context values are provided in an IArmApplication, IArmTransaction or IArmTranReport object. If the name at an array index is null, the corresponding value in those objects is ignored.

IArmIdentityProperties

Parameters:
identityNames an array of identity property names.
identityValues an array of identity property values.
contextNames an array of identity property names.
Returns:
a new IArmIdentityProperties object.
IArmIdentityPropertiesTransaction OpenGroup::arm40::Provisional::transaction::IArmTransactionFactory::newArmIdentityPropertiesTransaction ( string[]  identityNames,
string[]  identityValues,
string[]  contextNames,
string  uriValue 
)

See the newArmIdentityProperties description for all other parameters.

IArmIdentityPropertiesTransaction

Parameters:
identityNames an array of identity property names.
identityValues an array of identity property values.
contextNames an array of identity property names.
uriValue the URI property value.
Returns:
a new IArmIdentityPropertiesTransaction object.
IArmTransaction OpenGroup::arm40::Provisional::transaction::IArmTransactionFactory::newArmTransaction ( IArmApplication  app,
IArmTransactionDefinition  definition 
)

IArmTransaction

Parameters:
app the application instance the transaction belongs to.
definition the metadata describing the type of the transaction.
Returns:
a new IArmTransaction instance.
IArmTransactionDefinition OpenGroup::arm40::Provisional::transaction::IArmTransactionFactory::newArmTransactionDefinition ( IArmApplicationDefinition  app,
string  name,
IArmIdentityPropertiesTransaction  identityProperties,
IArmID  id 
)

IArmTransactionDefinition

Parameters:
app the metadata describing the type of the containing application. Must not be null.
name the name of the transaction type. A name should be chosen that is unique. Must not be null.
identityProperties a set of properties contibuting to the identity of the transaction definition. May be null. See newArmIdentityProperties
id An optional 16-byte ID associated with the identity of the transaction definition.
Returns:
a new IArmTransactionDefinition.
IArmUser OpenGroup::arm40::Provisional::transaction::IArmTransactionFactory::newArmUser ( string  name,
IArmID  id 
)

IArmUser

Parameters:
name name of the user.
id An optional 16-byte ID associated with the user.
Returns:
a new ArmUser object.
bool OpenGroup::arm40::Provisional::transaction::IArmTransactionFactory::SetErrorCallback ( IArmErrorCallback  errorCallback  ) 

See the error handling philosophy comment in the description of this interface.

Parameters:
errorCallback an application object implementing the IArmErrorCallback interface.
Returns:
true if registration is accepted.

The documentation for this interface was generated from the following file:
  • opengroup/arm40/provisional/transaction/IArmTransactionFactory.cs