|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgudusoft.gsqlparser.crypto.HardwareBinder
public class HardwareBinder
Field Summary | |
---|---|
static java.lang.String |
HEXES
|
Constructor Summary | |
---|---|
HardwareBinder()
|
Method Summary | |
---|---|
static java.lang.String |
getHex(byte[] raw)
|
java.lang.String |
getMachineIdString()
|
void |
ignoreArchitecture()
The UUID generation uses the architecture string as returned by System.getProperty("os.arch") . |
void |
ignoreHostName()
When calculating the machine UUID the host name is also taken into account by default. |
void |
ignoreNetwork()
When calculating the uuid of a machine the network interfaces are enumerated and their parameters are taken into account. |
void |
setUseHwAddress()
By default the class does not take the hardware addresses into account. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String HEXES
Constructor Detail |
---|
public HardwareBinder()
Method Detail |
---|
public void setUseHwAddress()
Even though it is possible using this class to create a machine ID that relies on the hardware addresses and the names of the network cards if the software runs on Java6 or later.
To do so call this method before calling any other uuid calculating method.
If the code runs on Java5 then the algorith automatically falls back to ignoring the mac addresses and thus may generate different ID than when it is run under Java6.
public void ignoreHostName()
public void ignoreNetwork()
If you want to ignore the network when generating the uuid then call this method before any uuid calculating methos.
public void ignoreArchitecture()
System.getProperty("os.arch")
. In some rare cases you want to
have a UUID that is independent of the architecture.
public java.lang.String getMachineIdString()
public static java.lang.String getHex(byte[] raw)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |