public abstract class AbstractExporter<O extends IOObject> extends AbstractNurseryService implements Exporter<IOObject,O,ExportConfiguration,nu.xom.Element>
IOObject
's.GenericService.StartCommand, GenericService.StopCommand
Modifier and Type | Field and Description |
---|---|
protected org.apache.log4j.Logger |
mLogger |
CLASS_VERSION
state
Constructor and Description |
---|
AbstractExporter() |
Modifier and Type | Method and Description |
---|---|
protected nu.xom.Element |
createElement(String pName)
Creates a new
Element with the given name in the default namespace |
protected nu.xom.Element |
createElement(String pName,
String pNamespace)
Creates a new
Element with the given name in the given namespace |
protected void |
startService()
Is called by
AbstractNurseryService.doStartService() when the NurseryService is being started. |
protected void |
stopService()
Is called by
AbstractNurseryService.doStopService() when the service is being shut down. |
doStartService, doStopService, stopIdleService
assertServiceRunning, getServiceDescription, getServiceMessage, getServiceState, isServiceEnabled, isServiceFailed, isServiceIdle, isServiceRunning, isServiceShutdownFailed, isServiceStopped, setServiceDescription, setServiceEnabled, start, stop, validateIsTrue, validateNotNull
protected nu.xom.Element createElement(String pName)
Element
with the given name in the default namespacepName
- the name of the new Element
Element
with the given name in the default namespaceprotected nu.xom.Element createElement(String pName, String pNamespace)
Element
with the given name in the given namespacepName
- the name of the new Element
pNamespace
- the namespace of the new elementElement
with the given name in the given namespaceprotected void startService() throws Exception
AbstractNurseryService
Is called by AbstractNurseryService.doStartService()
when the NurseryService
is being started. Exceptions thrown by this
method are logged by AbstractNurseryService.doStartService()
.
Subclasses must implement this method to bootstrap the service.
startService
in class AbstractNurseryService
Exception
- when something goes wrong during startup. GenericService.isServiceRunning()
will return false
and GenericService.isServiceFailed()
will return true
.IllegalArgumentException
- when the configuration of the service
is invalid. GenericService.isServiceRunning()
will return false
and GenericService.isServiceFailed()
will return true
.IllegalStateException
- when this service is in the wrong state for startup. Used to signal to AbstractNurseryService.doStartService()
that it is OK to try to starting
this service
later. GenericService.isServiceRunning()
returns false
and GenericService.isServiceIdle()
returns true
.AbstractNurseryService.doStartService()
protected void stopService() throws Exception
AbstractNurseryService
Is called by AbstractNurseryService.doStopService()
when the service
is being shut down. Exceptions thrown by this
method are logged by AbstractNurseryService.doStopService()
.
Subclasses must implement this method to shut down the service.
stopService
in class AbstractNurseryService
IllegalStateException
- when this service is in the wrong state for shutdown. Used to signal to AbstractNurseryService.doStopService()
that
it is OK to try stopping this service
later. GenericService.isServiceRunning()
returns true
.Exception
- when something goes during shutdown. GenericService.isServiceRunning()
returns false
and
GenericService.isServiceShutdownFailed()
returns true
.AbstractNurseryService.doStopService()
© 1998- 2021 Escenic AS