|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.id.uuid.state.StateHelper
public final class StateHelper
StateHelper provides helper methods for the uuid state
implementations.
| Field Summary | |
|---|---|
static short |
BYTES_IN_SHORT
Number of bytes in a short. |
static short |
HOSTNAME_MAX_CHAR_LEN
Number of postitions to shift when shifting by one byte. |
static int |
NODE_ID_BYTE_LENGTH
Array length of node bytes. |
static short |
SHIFT_BY_BYTE
Number of postitions to shift when shifting by one byte. |
static String |
UUID_CLOCK_IMPL_PROPERTY_KEY
The key for the System.property containing the ClockImpl String. |
static String |
UUID_STATE_IMPL_PROPERTY_KEY
The key for the System.property containing the StateImpl String. |
protected static String |
XML_DOC_END
End of the XML document used to store state persistence in XML |
protected static String |
XML_DOC_START
Start of the XML document used to store state persistence in XML |
protected static String |
XML_DOC_START_END
End of document start |
protected static String |
XML_NODE_TAG_AFTER_CSEQ
After clock sequence of XML node tag |
protected static String |
XML_NODE_TAG_AFTER_ID
After id of XML node tag |
protected static String |
XML_NODE_TAG_END
End of XML node tag |
protected static String |
XML_NODE_TAG_START
Start of XML node tag |
| Method Summary | |
|---|---|
static byte[] |
decodeMACAddress(String address)
Utility method decodes a valid MAC address in the form of XX-XX-XX-XX-XX-XX where each XX represents a hexidecimal value. |
static String |
encodeMACAddress(byte[] address)
Returns the node id / address byte array in it's hexidecimal string representation in the following format: XX-XX-XX-XX-XX-XX where each XX represents a hexidecimal value. |
static Clock |
getClockImpl()
Returns the Clock implementation using commons discovery. |
static State |
getStateImpl()
Returns the State implementation in use. |
static short |
newClockSequence()
Generates a new security quality random clock sequence. |
static byte[] |
randomNodeIdentifier()
Creates a Random node identifier as described in IEFT UUID URN specification. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String UUID_CLOCK_IMPL_PROPERTY_KEY
public static final String UUID_STATE_IMPL_PROPERTY_KEY
public static final int NODE_ID_BYTE_LENGTH
public static final short BYTES_IN_SHORT
public static final short SHIFT_BY_BYTE
public static final short HOSTNAME_MAX_CHAR_LEN
protected static final String XML_DOC_START
protected static final String XML_DOC_START_END
protected static final String XML_NODE_TAG_START
protected static final String XML_NODE_TAG_AFTER_ID
protected static final String XML_NODE_TAG_AFTER_CSEQ
protected static final String XML_NODE_TAG_END
protected static final String XML_DOC_END
| Method Detail |
|---|
public static byte[] randomNodeIdentifier()
Creates a Random node identifier as described in IEFT UUID URN specification.
public static short newClockSequence()
Generates a new security quality random clock sequence.
public static Clock getClockImpl()
Returns the Clock implementation using commons discovery.
public static State getStateImpl()
Returns the State implementation in use.
State implementation in use.public static byte[] decodeMACAddress(String address)
Utility method decodes a valid MAC address in the form of XX-XX-XX-XX-XX-XX where each XX represents a hexidecimal value.
Returns null if the address can not be decoded.
address - the String hexidecimal dash separated MAC address.
public static String encodeMACAddress(byte[] address)
throws IOException
Returns the node id / address byte array in it's hexidecimal string representation in the following format: XX-XX-XX-XX-XX-XX where each XX represents a hexidecimal value.
address - the 6 byte node id / address.
IOException - an Input Output Exception.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||