public abstract class TurbineBaseService extends BaseService
This class provides a Service
implementation that
Services used in Turbine are required to extend. The
functionality provided in addition to BaseService
functionality is recognizing objects used in early initialization
of Services
in Turbine, and passing them to
appropriate convenience methods. These methods should be overridden
to provide desired initialization functionality.
Note!
Remember to call
setInit(true)
after successful initialization.
Note!
If you need to use another
Service
inside your early initialization, remember to
request initialization of that Service
before using
it:
getServiceBroker().initClass("OtherService",data); OtherService service = (OtherService)getServiceBroker().getService("OtherService");
configuration, name, serviceBroker
initableBroker, isInitialized
SERVICE_NAME
Constructor and Description |
---|
TurbineBaseService() |
Modifier and Type | Method and Description |
---|---|
void |
init()
Performs late initialization.
|
void |
init(Object data)
Performs early initialization.
|
void |
init(PipelineData pipelineData)
Performs early initialization.
|
void |
shutdown()
Returns to uninitialized state.
|
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker
getInit, getInitableBroker, setInit, setInitableBroker
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInit, setInitableBroker
public TurbineBaseService()
public void init(Object data) throws InitializationException
init
in interface Initable
init
in class BaseInitable
data
- An Object to use for initialization activities.InitializationException
- if initialization of this
class was not successful.public void init(PipelineData pipelineData) throws InitializationException
pipelineData
- A PipelineData to use for initialization activities.InitializationException
- if initialization of this
class was not successful.public void init() throws InitializationException
init
in interface Initable
init
in class BaseInitable
InitializationException
- if initialization of this
class was not successful.public void shutdown()
shutdown
in interface Initable
shutdown
in class BaseInitable
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.