|
ALBPM Process API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfuego.papi.InstanceId
public class InstanceId
Contains the declaration of an instance.
An instance is formed by: the process identification number, the instance identification number, and the thread identification number. Here are available all those operations over an instance id, such as obtaining the process in, or the thread in from it.
Field Summary | |
---|---|
static String |
NAME_SEPARATOR
|
static String |
ORGANIZATION_SEPARATOR
|
Constructor Summary | |
---|---|
InstanceId(int processIn,
int instanceIn,
int threadIn)
Simple constructor for using key. |
Method Summary | |
---|---|
static int |
compare(InstanceId leftInstanceId,
InstanceId rightInstanceId)
Compares one InstanceId with other InstanceId. |
int |
compareTo(Object obj)
Compares this object with the specified object for order. |
static boolean |
equals(InstanceId leftInstanceId,
InstanceId rightInstanceId)
Returns if the one InstanceId is equals to other InstanceId. |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
static InstanceId |
getInstanceId(InstanceInfo instanceInfo)
Generate a new InstanceId from an InstanceInfo. |
static String |
getInstanceId(String globalInstanceId)
Returns the Instance Id without the organization |
int |
getInstanceIn()
Gets the instance identification number in the process where this instance has been created. |
static int |
getInstanceIn(String instanceId)
Returns the Instance IN from a specific Instance Id |
static String |
getOrganization(String globalInstanceId)
Returns the Organization from a specific GlobalInstanceId |
static String |
getProcessId(String instanceId)
Returns the Process Identification from a specific Instance identification. |
int |
getProcessIn()
Gets the process identification number where this instance has been created |
int |
getThreadIn()
Gets the instance thread/copy identification number. |
static int |
getThreadIn(String instanceId)
Returns the Instance Thread from a specific Instance Id. |
int |
hashCode()
Returns a hash code value for the object. |
static boolean |
isProcessId(String instanceOrProcessId)
Returns if a specific string could be a process identification or not. |
static boolean |
isValidInstanceId(String instanceId)
Validates the correct sintax of a specific Instance Id. |
static String |
makeGlobalId(String organization,
String processId,
int instanceIn)
Through this method a new global instance id will be created |
static String |
makeGlobalId(String organization,
String processId,
int instanceIn,
int threadIn)
Through this method a new global instance id will be created |
String |
makeId(String processId)
Through this method a new instance id will be retrieved for the given process id |
static String |
makeId(String processId,
int instanceIn)
Through this method a new instance id will be created |
static String |
makeId(String processId,
int instanceIn,
int threadIn)
Through this method a new instance id will be created |
String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String NAME_SEPARATOR
public static final String ORGANIZATION_SEPARATOR
Constructor Detail |
---|
public InstanceId(int processIn, int instanceIn, int threadIn)
processIn
- Process identification number where the instance has been created.instanceIn
- Instance identification number in the process where the instance has been created.threadIn
- Instance copy/thread number of the instance (if the instance does not have parent
the value is 0).Method Detail |
---|
public static InstanceId getInstanceId(InstanceInfo instanceInfo)
instanceInfo
- InstanceInfo whose will use to create the new InstanceId.public static int compare(InstanceId leftInstanceId, InstanceId rightInstanceId)
leftInstanceId
- InstanceId to be compared.rightInstanceId
- InstanceId to be compared.
public static boolean equals(InstanceId leftInstanceId, InstanceId rightInstanceId)
leftInstanceId
- InstanceId to be compared.rightInstanceId
- InstanceId to be compared.
true
if both InstanceId are equals and false
if not.public static String getInstanceId(String globalInstanceId)
globalInstanceId
- String Global Instance Identification.
NullPointerException
- when globalInstanceId is null.public static int getInstanceIn(String instanceId)
instanceId
- String Instance Identification.
NullPointerException
- when instanceId is null.public static String getOrganization(String globalInstanceId)
globalInstanceId
- Global Instance Id (Instance Id with the Organization)public static String getProcessId(String instanceId)
instanceId
- String instance identification.
public static boolean isProcessId(String instanceOrProcessId)
instanceOrProcessId
- String to check.
true
if the String could be a process identification.public static int getThreadIn(String instanceId)
instanceId
- Instance Id. Note: this parameter must not be null.
NullPointerException
- when instanceId is null.public static boolean isValidInstanceId(String instanceId)
instanceId
- It must not be null.
NullPointerException
- when instanceId is null.public static String makeGlobalId(String organization, String processId, int instanceIn)
organization
- Organization where the instance has been created.processId
- The process identification where the instance has been created.instanceIn
- The instance identification numbre in the process where the instance has been created.
public static String makeGlobalId(String organization, String processId, int instanceIn, int threadIn)
organization
- Organization where the instance has been created.processId
- The process identification where the instance has been created.instanceIn
- The instance identification numbre in the process where the instance has been created.threadIn
- The copy/thread of the instance (0 if the parent instance).
public static String makeId(String processId, int instanceIn)
processId
- The process identification where the instance has been created.instanceIn
- The instance identification numbre in the process where the instance has been created.
public static String makeId(String processId, int instanceIn, int threadIn)
processId
- The process identification where the instance has been created.instanceIn
- The instance identification numbre in the process where the instance has been created.threadIn
- The copy/thread of the instance (0 if the parent instance).
public final int getInstanceIn()
public final int getProcessIn()
public final int getThreadIn()
If the instance has a father, the thread in is the number of child the instance is. Otherwise this number is 0.
public final boolean equals(Object obj)
equals
in class Object
obj
- the reference object with which to compare.
true
if this object is the same as the obj
argument; false
otherwise.public final int compareTo(Object obj)
compareTo
in interface Comparable
obj
- the Object to be compared.
ClassCastException
- if the specified object's type prevents it
from being compared to this Object.public int hashCode()
java.util.Hashtable
.
hashCode
in class Object
public String makeId(String processId)
public String toString()
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
toString
in class Object
|
ALBPM Process API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |