public abstract class PoolExporter<P extends Pool> extends AbstractExporter<P>
GenericService.StartCommand, GenericService.StopCommand
mLogger
CLASS_VERSION
state
Constructor and Description |
---|
PoolExporter(String... pPoolTypes) |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(IOObject pObjectToExport,
ExportConfiguration pConfiguration)
Returns
true if the given object can be handled by this exporter. |
protected void |
addDefaultAttributes(nu.xom.Element pElement,
Article pArticle) |
protected void |
addDefaultAttributes(nu.xom.Element pElement,
Pool pEntity) |
ObjectLoader |
getObjectLoader() |
void |
setObjectLoader(ObjectLoader pObjectLoader) |
protected void |
startService()
Is called by
AbstractNurseryService.doStartService() when the NurseryService is being started. |
createElement, createElement, stopService
doStartService, doStopService, stopIdleService
assertServiceRunning, getServiceDescription, getServiceMessage, getServiceState, isServiceEnabled, isServiceFailed, isServiceIdle, isServiceRunning, isServiceShutdownFailed, isServiceStopped, setServiceDescription, setServiceEnabled, start, stop, validateIsTrue, validateNotNull
public PoolExporter(String... pPoolTypes)
public ObjectLoader getObjectLoader()
public void setObjectLoader(ObjectLoader pObjectLoader)
protected 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 AbstractExporter<P extends Pool>
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()
public boolean accepts(IOObject pObjectToExport, ExportConfiguration pConfiguration)
Exporter
true
if the given object can be handled by this exporter.pObjectToExport
- the object to be exportedpConfiguration
- the configuration objecttrue
if the given object can be handled by this exporter. false
otherwiseprotected void addDefaultAttributes(nu.xom.Element pElement, Article pArticle)
protected void addDefaultAttributes(nu.xom.Element pElement, Pool pEntity)
© 1998- 2021 Escenic AS