|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.arm4.arm40.transaction.ArmInterface
org.arm4.arm40.transaction.ArmFactory
org.arm4.arm40.transaction.ArmTransactionFactory
public class ArmTransactionFactory
ArmTransactionFactory provides methods to create instances of the classes in the org.opengroup.arm40.transaction package. An error callback method can be registered for objects created with this factory. ArmTransactionFactory 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 propertyKey constant of ArmTransactionFactory.
| Field Summary | |
|---|---|
static java.lang.String |
propertyKey
|
| Fields inherited from class org.arm4.arm40.transaction.ArmFactory |
|---|
m_nativeLoaded |
| Fields inherited from class org.arm4.arm40.transaction.ArmInterface |
|---|
m_errorCode, m_factory |
| Constructor Summary | |
|---|---|
ArmTransactionFactory()
|
|
| Method Summary | |
|---|---|
ArmApplication |
newArmApplication(ArmApplicationDefinition definition,
java.lang.String group,
java.lang.String instance,
java.lang.String[] contextValues)
Creates the ArmApplication object to which
transaction instances are related. |
ArmApplicationDefinition |
newArmApplicationDefinition(java.lang.String name,
ArmIdentityProperties identityProperties,
ArmID id)
Creates the ArmApplicationDefinition object that
describes the metadata about an application. |
ArmCorrelator |
newArmCorrelator(byte[] corrBytes)
Creates a correlator from a byte array in the correct format. |
ArmCorrelator |
newArmCorrelator(byte[] corrBytes,
int offset)
Creates a correlator from a byte array in the correct format. |
ArmID |
newArmID(byte[] idBytes)
Creates the objects that contain an immutable 16-byte ID. |
ArmID |
newArmID(byte[] idBytes,
int offset)
Creates the objects that contain an immutable 16-byte ID. |
ArmIdentityProperties |
newArmIdentityProperties(java.lang.String[] identityNames,
java.lang.String[] identityValues,
java.lang.String[] contextNames)
Creates an object that contains an immutable set of identity property names and values, and an immutable set of context property names. |
ArmIdentityPropertiesTransaction |
newArmIdentityPropertiesTransaction(java.lang.String[] identityNames,
java.lang.String[] identityValues,
java.lang.String[] contextNames,
java.lang.String uriValue)
Creates an object that extends newArmIdentityProperties
to also include a URI property, which is also immutable. |
ArmTransaction |
newArmTransaction(ArmApplication app,
ArmTransactionDefinition definition)
Creates an object that represents an instance of a transaction. |
ArmTransactionDefinition |
newArmTransactionDefinition(ArmApplicationDefinition app,
java.lang.String name,
ArmIdentityPropertiesTransaction identityProperties,
ArmID id)
Creates an object that represents the metadata about a transaction. |
ArmUser |
newArmUser(java.lang.String name,
ArmID id)
Creates an ArmUser object that represents the user who invoked (directly or indirectly) the transaction. |
boolean |
setErrorCallback(ArmErrorCallback errorCallback)
Registers an error callback for objects created through this factory. |
| Methods inherited from class org.arm4.arm40.transaction.ArmInterface |
|---|
getErrorCode, getErrorMessage, getFactory, setErrorCode, setFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opengroup.arm40.transaction.ArmInterface |
|---|
getErrorCode, getErrorMessage, setErrorCode |
| Field Detail |
|---|
public static final java.lang.String propertyKey
| Constructor Detail |
|---|
public ArmTransactionFactory()
| Method Detail |
|---|
public ArmApplication newArmApplication(ArmApplicationDefinition definition,
java.lang.String group,
java.lang.String instance,
java.lang.String[] contextValues)
ArmTransactionFactoryArmApplication object to which
transaction instances are related.
definition is the only required non-null
parameter.
newArmApplication in interface ArmTransactionFactorydefinition - 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.
ArmApplication instance.ArmApplication
public ArmApplicationDefinition newArmApplicationDefinition(java.lang.String name,
ArmIdentityProperties identityProperties,
ArmID id)
ArmTransactionFactoryArmApplicationDefinition object that
describes the metadata about an application.
That is, the descriptive data that is the same for all
instances of the same application.
name is the only required non-null parameter.
newArmApplicationDefinition in interface ArmTransactionFactoryname - the name of the application type. A name should be chosen
that is unique.
Must not be nullidentityProperties - a set of properties contibuting to the
identity of the application definition.
May be null.
See ArmTransactionFactory.newArmIdentityProperties(java.lang.String[], java.lang.String[], java.lang.String[]).id - An optional 16-byte ID associated with the identity of
the application definition.
ArmApplicationDefinition.ArmApplicationDefinitionpublic ArmCorrelator newArmCorrelator(byte[] corrBytes)
ArmTransactionFactoryArmConstants.ARM_CORR_MAX_LENGTH.
If the correlator is longer than the ARM implementation supports,
an ArmCorrelator object will be created, but
it may contain dummy data, at the discretion of the ARM implementation.
newArmCorrelator in interface ArmTransactionFactorycorrBytes - a byte array containig correlator data.
ArmCorrelator.ArmCorrelator
public ArmCorrelator newArmCorrelator(byte[] corrBytes,
int offset)
ArmTransactionFactoryArmTransactionFactory.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.
newArmCorrelator in interface ArmTransactionFactorycorrBytes - a byte array containig correlator data.offset - start of the correlator bytes within the array.
ArmCorrelator.public ArmID newArmID(byte[] idBytes)
ArmTransactionFactory
newArmID in interface ArmTransactionFactoryidBytes - a byte array containig ID data.
ArmID.ArmID
public ArmID newArmID(byte[] idBytes,
int offset)
ArmTransactionFactoryArmTransactionFactory.newArmID(byte[]).
newArmID in interface ArmTransactionFactoryidBytes - a byte array containig ID data.offset - start of the ID bytes within the array.
ArmID.
public ArmIdentityProperties newArmIdentityProperties(java.lang.String[] identityNames,
java.lang.String[] identityValues,
java.lang.String[] contextNames)
ArmTransactionFactorynull 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 ArmApplication,
ArmTransaction or ArmTranReport object.
If the name at an array index is null, the
corresponding value in those objects is ignored.
newArmIdentityProperties in interface ArmTransactionFactoryidentityNames - an array of identity property names.identityValues - an array of identity property values.contextNames - an array of identity property names.
ArmIdentityProperties
public ArmIdentityPropertiesTransaction newArmIdentityPropertiesTransaction(java.lang.String[] identityNames,
java.lang.String[] identityValues,
java.lang.String[] contextNames,
java.lang.String uriValue)
ArmTransactionFactorynewArmIdentityProperties
to also include a URI property, which is also immutable.
See the ArmTransactionFactory.newArmIdentityProperties(java.lang.String[], java.lang.String[], java.lang.String[]) description for all
other parameters.
newArmIdentityPropertiesTransaction in interface ArmTransactionFactoryidentityNames - 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.
ArmIdentityPropertiesTransaction
public ArmTransaction newArmTransaction(ArmApplication app,
ArmTransactionDefinition definition)
ArmTransactionFactory
newArmTransaction in interface ArmTransactionFactoryapp - the application instance the transaction belongs to.definition - the metadata describing the type of the transaction.
ArmTransaction instance.ArmTransaction
public ArmTransactionDefinition newArmTransactionDefinition(ArmApplicationDefinition app,
java.lang.String name,
ArmIdentityPropertiesTransaction identityProperties,
ArmID id)
ArmTransactionFactory
newArmTransactionDefinition in interface ArmTransactionFactoryapp - 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 ArmTransactionFactory.newArmIdentityProperties(java.lang.String[], java.lang.String[], java.lang.String[]).id - An optional 16-byte ID associated with the identity of
the transaction definition.
ArmTransactionDefinition.ArmTransactionDefinition
public ArmUser newArmUser(java.lang.String name,
ArmID id)
ArmTransactionFactory
newArmUser in interface ArmTransactionFactoryname - name of the user.id - An optional 16-byte ID associated with the user.
ArmUser object.ArmUserpublic boolean setErrorCallback(ArmErrorCallback errorCallback)
ArmTransactionFactory
setErrorCallback in interface ArmTransactionFactorysetErrorCallback in class ArmFactoryerrorCallback - an application object implementing the
ArmErrorCallback> interface.
- Returns:
true if registration is accepted.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||