public final class XMLImportService
extends neo.xredsys.api.services.SingleThreadedExecutor
GenericService.StartCommand, GenericService.StopCommand
mLogger, state
Constructor and Description |
---|
XMLImportService() |
Modifier and Type | Method and Description |
---|---|
void |
addImportConfigurations(XMLImportConfiguration... pConfigurations) |
protected void |
checkServiceRunning()
Deprecated.
|
HitCollector |
getHitCollector() |
XMLImportConfiguration[] |
getImportConfigurations() |
XMLImporter |
getImporter() |
String |
getLockFilename()
Get the value of lockFilename.
|
int |
getModificationThreshold()
Return the modification threshold in milliseconds.
|
boolean |
getRemoveLockOnStartup() |
String |
getRevision()
Deprecated.
no replacement
|
String |
getStopFilename()
Get the value of stopFilename.
|
boolean |
isServiceStarted()
Deprecated.
use
GenericService.isServiceRunning() instead |
void |
setHitCollector(HitCollector collector) |
void |
setImportConfigurations(XMLImportConfiguration... pConfigurations) |
void |
setImporter(XMLImporter pImporter) |
void |
setLockFilename(String pFilename)
Set the value of lockFilename.
|
void |
setModificationThreshold(int pModificationThreshold)
Specify the modification threshold, in milliseconds.
|
void |
setRemoveLockOnStartup(boolean pRemoveLock) |
void |
setStopFilename(String pFilename)
Set the value of stopFilename.
|
protected void |
singleExecute()
Invoked when an alarm is triggered.
|
void |
spawnImport()
Deprecated.
use
singleExecute() instead |
protected void |
startExecutor()
Will be called from
SingleThreadedExecutor.startService()() when we are the server to provide this SingleThreadedExecutor . |
protected void |
stopExecutor()
Will be called from
SingleThreadedExecutor.stopService() when we are to stop providing this SingleThreadedExecutor . |
execute, getAlarmMessage, isExecuting, startService, stopService
doStartService, doStopService, stopIdleService
assertServiceRunning, getServiceDescription, getServiceMessage, getServiceState, isServiceEnabled, isServiceFailed, isServiceIdle, isServiceRunning, isServiceShutdownFailed, isServiceStopped, setServiceDescription, setServiceEnabled, start, stop, validateIsTrue, validateNotNull
protected void startExecutor() throws Exception
neo.xredsys.api.services.SingleThreadedExecutor
Will be called from SingleThreadedExecutor.startService()()
when we are the server to provide this SingleThreadedExecutor
. Exceptions thrown from this
method will be logged by AbstractNurseryService.doStartService()
.
Subclasses must implement this method to bootstrap the service.
startExecutor
in class neo.xredsys.api.services.SingleThreadedExecutor
Exception
- when something goes wrong when starting this SingleThreadedExecutor
. GenericService.isServiceRunning()
will return false
and GenericService.isServiceFailed()
will return true
.IllegalArgumentException
- when the configuration of the SingleThreadedExecutor
is invalid. GenericService.isServiceRunning()
will return false
and GenericService.isServiceFailed()
will
return true
.IllegalStateException
- when this service is in the wrong state for being started at this time. Used to signal to AbstractNurseryService.doStartService()
that it is OK to try to start
this SingleThreadedExecutor
later. GenericService.isServiceRunning()
will return false
and GenericService.isServiceIdle()
will return true
.SingleThreadedExecutor.startService()
,
AbstractNurseryService.doStartService()
protected void stopExecutor() throws Exception
neo.xredsys.api.services.SingleThreadedExecutor
Will be called from SingleThreadedExecutor.stopService()
when we are to stop providing this SingleThreadedExecutor
. Exceptions thrown from this
method will be logged by AbstractNurseryService.doStopService()
.
Subclasses must implement this method to shutdown the service.
stopExecutor
in class neo.xredsys.api.services.SingleThreadedExecutor
IllegalStateException
- when this service is in the wrong state for being stopped at this time. Used to signal to AbstractNurseryService.doStopService()
that it is OK to try to stop
this service
later. GenericService.isServiceRunning()
will return true
.Exception
- when something goes wrong when stopping this service
. GenericService.isServiceRunning()
will return false
and GenericService.isServiceShutdownFailed()
will return true
.SingleThreadedExecutor.stopService()
public String getRevision()
protected final void checkServiceRunning()
GenericService.assertServiceRunning()
()}IllegalStateException
- if the service is not startedpublic boolean isServiceStarted()
GenericService.isServiceRunning()
insteadpublic boolean getRemoveLockOnStartup()
public void setRemoveLockOnStartup(boolean pRemoveLock)
public void setImporter(XMLImporter pImporter)
public XMLImporter getImporter()
public String getLockFilename()
public void setLockFilename(String pFilename)
pFilename
- Value to assign to lockFilename.public String getStopFilename()
public void setStopFilename(String pFilename)
pFilename
- Value to assign to stopFilename.protected void singleExecute()
neo.xredsys.api.services.SingleThreadedExecutor
SingleThreadedExecutor.execute()
.singleExecute
in class neo.xredsys.api.services.SingleThreadedExecutor
public void spawnImport()
singleExecute()
insteadpublic void setHitCollector(HitCollector collector)
public HitCollector getHitCollector()
public int getModificationThreshold()
public void setModificationThreshold(int pModificationThreshold)
pModificationThreshold
- the new modification thresholdpublic XMLImportConfiguration[] getImportConfigurations()
public void setImportConfigurations(XMLImportConfiguration... pConfigurations)
public void addImportConfigurations(XMLImportConfiguration... pConfigurations)
© 1998- 2018 Stibo DX