org.jwarp.service.id
Class IdService

java.lang.Object
  |
  +--org.jwarp.service.AService
        |
        +--org.jwarp.service.id.IdService
All Implemented Interfaces:
IConfigurable, IExceptionProvider, IIdService, IReferenceable, IService

public class IdService
extends AService
implements IIdService

This is an implementation of UniqueIdService.

Version:
$Id: TurbineUniqueIdService.java,v 1.6 2000/12/19 18:11:34 jonbolt Exp $
Author:
Rafal Krzewski

Field Summary
protected  IDGenerator generator
          The identifier of this instance of service.
 
Fields inherited from class org.jwarp.service.AService
context, createdDate, dependencies, emptyProperties, exceptionListeners, log, resumedDate, serviceName, serviceStatus, serviceType, startedDate, stoppedDate, suspendedDate, systemTicket
 
Fields inherited from interface org.jwarp.service.id.IIdService
SERVICE_TYPE
 
Fields inherited from interface org.jwarp.service.IService
SERVICE_STATUS_CREATED, SERVICE_STATUS_NOT_AVAILABLE, SERVICE_STATUS_READY, SERVICE_STATUS_RESUMING, SERVICE_STATUS_RUNNING, SERVICE_STATUS_STARTING, SERVICE_STATUS_STOPPED, SERVICE_STATUS_STOPPING, SERVICE_STATUS_SUSPENDED
 
Constructor Summary
IdService()
           
 
Method Summary
 void configure(org.jdom.Element configuration)
          This configures the service.
 java.lang.String getId(ITicket ticket)
           Returns an identifier that is unique within this instance, but does not have random-like apearance.
 
Methods inherited from class org.jwarp.service.AService
addExceptionListener, checkContext, createLogFromXML, getContext, getCreationDate, getDependencies, getExceptionListeners, getLog, getLogLevel, getName, getReference, getResumedDate, getShutDownDate, getStartDate, getStatus, getSuspendedDate, getType, removeAllExceptionListeners, removeExceptionListener, resume, sendExceptionEvent, setContext, setDependencies, setLogLevel, setName, shutdown, start, suspend
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jwarp.service.IService
checkContext, getDependencies, getLogLevel, getName, getStatus, getType, resume, setContext, setDependencies, setLogLevel, shutdown, start, suspend
 
Methods inherited from interface org.jwarp.common.IExceptionProvider
addExceptionListener, getExceptionListeners, removeAllExceptionListeners, removeExceptionListener
 

Field Detail

generator

protected IDGenerator generator
The identifier of this instance of service.
Constructor Detail

IdService

public IdService()
Method Detail

configure

public void configure(org.jdom.Element configuration)
               throws ConfigurationException
This configures the service. The service can be configured and then started independently.
Specified by:
configure in interface IConfigurable
Overrides:
configure in class AService
Parameters:
configuration - the configuration root for this service
Throws:
ServiceConfigurationException - If the configuration is missing or invalid

getId

public java.lang.String getId(ITicket ticket)

Returns an identifier that is unique within this instance, but does not have random-like apearance.

Specified by:
getId in interface IIdService
Returns:
A String with the non-random looking instance identifier.

©   O R C A   S y s t e m s