public class TurbineUniqueIdService extends TurbineBaseService implements UniqueIdService
This is an implementation of UniqueIdService.
configuration, name, serviceBrokerinitableBroker, isInitializedSERVICE_NAME| Constructor and Description |
|---|
TurbineUniqueIdService() |
| Modifier and Type | Method and Description |
|---|---|
String |
getInstanceId()
Returns an identifier of this Turbine instance that is unique
both on the server and worldwide.
|
String |
getPseudorandomId()
Returns a unique identifier that looks like random data.
|
String |
getUniqueId()
Returns an identifier that is unique within this turbine
instance, but does not have random-like appearance.
|
void |
init()
Initializes the service upon first Turbine.doGet()
invocation.
|
void |
shutdown()
Writes a message to the log upon system shutdown.
|
init, initgetConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBrokergetInit, getInitableBroker, setInit, setInitableBrokerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfiguration, getName, getProperties, setName, setServiceBrokergetInit, init, setInitableBrokerpublic void init()
throws InitializationException
Initializes the service upon first Turbine.doGet() invocation.
init in interface Initableinit in class TurbineBaseServiceInitializationException - if initialization of this
class was not successful.public void shutdown()
Writes a message to the log upon system shutdown.
shutdown in interface Initableshutdown in class TurbineBaseServicepublic String getInstanceId()
Returns an identifier of this Turbine instance that is unique both on the server and worldwide. This identifier is computed as an MD5 sum of the URL (including schema, address, port if different that 80/443 respectively, context and servlet name). There is an overwhelming probability that this id will be different that all other Turbine instances online.
getInstanceId in interface UniqueIdServicepublic String getUniqueId()
Returns an identifier that is unique within this turbine instance, but does not have random-like appearance.
getUniqueId in interface UniqueIdServicepublic String getPseudorandomId()
Returns a unique identifier that looks like random data.
getPseudorandomId in interface UniqueIdServiceCopyright © 2000–2019 The Apache Software Foundation. All rights reserved.