public class ArmTransactionFactory extends ArmFactory implements ArmTransactionFactory
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
propertyKey |
m_nativeLoaded
m_errorCode, m_factory
Constructor and Description |
---|
ArmTransactionFactory() |
Modifier and Type | Method and Description |
---|---|
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.
|
getErrorCode, getErrorMessage, getFactory, setErrorCode, setFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getErrorCode, getErrorMessage, setErrorCode
public static final java.lang.String propertyKey
public ArmApplication newArmApplication(ArmApplicationDefinition definition, java.lang.String group, java.lang.String instance, java.lang.String[] contextValues)
ArmTransactionFactory
ArmApplication
object to which
transaction instances are related.
definition
is the only required non-null
parameter.newArmApplication
in interface ArmTransactionFactory
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
.ArmApplication
instance.ArmApplication
public ArmApplicationDefinition newArmApplicationDefinition(java.lang.String name, ArmIdentityProperties identityProperties, ArmID id)
ArmTransactionFactory
ArmApplicationDefinition
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 ArmTransactionFactory
name
- the name of the application type. A name should be chosen
that is unique.
Must not be null
identityProperties
- 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
.ArmApplicationDefinition
public ArmCorrelator newArmCorrelator(byte[] corrBytes)
ArmTransactionFactory
ArmConstants.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 ArmTransactionFactory
corrBytes
- a byte array containig correlator data.ArmCorrelator
.ArmCorrelator
public ArmCorrelator newArmCorrelator(byte[] corrBytes, int offset)
ArmTransactionFactory
ArmTransactionFactory.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 ArmTransactionFactory
corrBytes
- 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 ArmTransactionFactory
idBytes
- a byte array containig ID data.ArmID
.ArmID
public ArmID newArmID(byte[] idBytes, int offset)
ArmTransactionFactory
ArmTransactionFactory.newArmID(byte[])
.newArmID
in interface ArmTransactionFactory
idBytes
- 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)
ArmTransactionFactory
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 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 ArmTransactionFactory
identityNames
- 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)
ArmTransactionFactory
newArmIdentityProperties
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 ArmTransactionFactory
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.ArmIdentityPropertiesTransaction
public ArmTransaction newArmTransaction(ArmApplication app, ArmTransactionDefinition definition)
ArmTransactionFactory
newArmTransaction
in interface ArmTransactionFactory
app
- 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 ArmTransactionFactory
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 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 ArmTransactionFactory
name
- name of the user.id
- An optional 16-byte ID associated with the user.ArmUser
object.ArmUser
public boolean setErrorCallback(ArmErrorCallback errorCallback)
ArmTransactionFactory
setErrorCallback
in interface ArmTransactionFactory
setErrorCallback
in class ArmFactory
errorCallback
- an application object implementing the
ArmErrorCallback> interface.
true
if registration is accepted.