Package com.highdeal.admin.hci
Class InstanceId
java.lang.Object
com.highdeal.admin.hci.InstanceId
- All Implemented Interfaces:
Comparable<InstanceId>
This
Java class represents a classification for the instances in a deployed SAP CC Core Server system; This classification identifies a system instance by an instance type
associated to a number that identifies the instances of the same type. This number is positive and not null and is defined at installation time.
Examples
dispatcher#1rater#1
Note
This classification is defined for an SAP CC system. If your system landscape includes two SAP CC systems, two instances may have the same identifier, but belonging to different SAP CC systems. For example dispatcher#1 and rater#1 are present on both SAP CC systems.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charThe string representation of the separator used in the syntax of an instance ID: '#' Refer to themarshal()andunmarshal()methodsstatic final InstanceIdInstance ID of the updater instance of the SAP CC system -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(InstanceId other) booleanstatic final InstanceIdgetInstanceId(InstanceType instanceType, int instanceNum) Returns anInstanceIdobject built from the specifiedinstance typeand a positive numberintReturns the number of an instance with the same type.Returns the instance type of the current instance ID.inthashCode()static final Stringmarshal(InstanceId instanceId) Marshals theInstanceIdobject into a string; The string result has the following syntax: <INSTANCE_TYPE>SEPARATOR<NUMBER>static final voidmarshal(InstanceId instanceId, com.highdeal.hmi.DataBuffer buffer) Marshals theInstanceIdobject into the specified data buffer.toString()static final InstanceIdunmarshal(com.highdeal.hmi.IDataBuffer buffer) Extracts anInstanceIdobject from the data buffer specified as argument.static final InstanceIdUnmarshals the string representation of an instance ID into anInstanceIdobject; The string argument have to respect the following grammar: <INSTANCE_TYPE>SEPARATOR<NUMBER>
-
Field Details
-
SEPARATOR
public static final char SEPARATORThe string representation of the separator used in the syntax of an instance ID: '#' Refer to themarshal()andunmarshal()methods- See Also:
-
UPDATER_ID
Instance ID of the updater instance of the SAP CC system
-
-
Method Details
-
getInstanceType
Returns the instance type of the current instance ID.- Returns:
- The
instance type
-
getInstanceNum
public int getInstanceNum()Returns the number of an instance with the same type.- Returns:
- The number of instance
-
compareTo
- Specified by:
compareToin interfaceComparable<InstanceId>
-
equals
-
hashCode
public int hashCode() -
toString
-
marshal
Marshals theInstanceIdobject into a string; The string result has the following syntax: <INSTANCE_TYPE>SEPARATOR<NUMBER>- Parameters:
instanceId- The instanceId to marshal- Returns:
- The string representation of the instanceId given in argument
- Throws:
IllegalArgumentException- when the argument isnull
-
unmarshal
public static final InstanceId unmarshal(String instanceId) throws IllegalArgumentException, NumberFormatException Unmarshals the string representation of an instance ID into anInstanceIdobject; The string argument have to respect the following grammar: <INSTANCE_TYPE>SEPARATOR<NUMBER>- Parameters:
instanceId- The result instanceId object- Returns:
- The instance identifier corresponding to the argument
- Throws:
IllegalArgumentException- When the string argument does not respect the format or isnullNumberFormatException- When the second part of the string is not a positive number
-
marshal
public static final void marshal(InstanceId instanceId, com.highdeal.hmi.DataBuffer buffer) throws IllegalArgumentException, BufferOverflowException Marshals theInstanceIdobject into the specified data buffer.- Parameters:
instanceId-buffer- The result data buffer- Throws:
IllegalArgumentException- When one isnullBufferOverflowException- If the buffer has not at least six bytes free
-
unmarshal
public static final InstanceId unmarshal(com.highdeal.hmi.IDataBuffer buffer) throws IllegalArgumentException, BufferUnderflowException Extracts anInstanceIdobject from the data buffer specified as argument.- Parameters:
buffer- The input data buffer- Returns:
- The
InstanceIdobject extracted from the buffer - Throws:
IllegalArgumentException- When the data buffer isnullBufferUnderflowException- If the buffer has not at least six bytes remaining
-
getInstanceId
public static final InstanceId getInstanceId(InstanceType instanceType, int instanceNum) throws IllegalArgumentException Returns anInstanceIdobject built from the specifiedinstance typeand a positive number- Parameters:
instanceType- From theInstanceTypeinstanceNum- A positive number- Returns:
- The
InstanceIdobject built - Throws:
IllegalArgumentException- When the instanceType is null or instanceNum is not positive and notnull
-