public abstract class AbstractService extends AbstractBehavioredComponent<Service> implements Service, ServiceMessages
Type | Property and Description |
---|---|
ObservableMap<String,ServiceTask<?>> |
pendingTasks
Return The Pending tasks map.
|
innerComponentMap, PROCESS_WAVE_METHOD_NAME, rootComponent
COUNT_LINES_ERROR, NO_RETURN_WAVE_CONSUMED, NO_RETURNED_WAVE_ITEM, NO_RETURNED_WAVE_TYPE_DEFINED, NO_WAVE_TYPE_DEFINED, SERVICE_TASK_ERROR, SERVICE_TASK_EXCEPTION, SERVICE_TASK_HANDLE_EXCEPTION, SERVICE_TASK_HAS_FAILED, SERVICE_TASK_NOT_MANAGED_EXCEPTION, SERVICE_TASK_RETURN_CONSUMES, SERVICE_TASK_RETURN_HANDLES
ADD_BEHAVIOR, CALL_ANNOTATED_METHOD_ERROR, COMMAND_NOT_FOUND_ERROR, COMMAND_NOT_FOUND_MESSAGE, COMPONENT_INJECTION_FAILURE, COMPONENT_RELEASE_ERROR, CUSTOM_METHOD_NOT_FOUND, LISTEN_WAVE_TYPE, MODEL_NOT_FOUND_ERROR, MODEL_NOT_FOUND_MESSAGE, NO_WAVE_LISTENER, NOTIFIER_CONSUMES, NOTIFIER_HANDLES, SEND_WAVE, SERVICE_NOT_FOUND_ERROR, SERVICE_NOT_FOUND_MESSAGE, UNLISTEN_WAVE_TYPE, WAVE_BEAN_CREATION_ERROR, WAVE_DISPATCH_ERROR, WAVE_HANDLING_ERROR, WAVE_LOST, WAVE_LOST_CONTEXT, WAVE_SENDING_ERROR
booleanItem, byteItem, characterItem, classItem, doubleItem, exceptionItem, floatItem, integerItem, longItem, shortItem, stringItem, voidItem
Constructor and Description |
---|
AbstractService() |
Modifier and Type | Method and Description |
---|---|
protected void |
finalize() |
ServiceTask<?> |
getPendingTask(String taskKey)
Retrieve a task from the pending list.
|
Collection<ServiceTask<?>> |
getPendingTaskList()
Get pending task list.
|
protected abstract void |
initService()
Custom method used to initialize the service.
|
ObservableMap<String,ServiceTask<?>> |
pendingTasksProperty()
Return The Pending tasks map.
|
void |
ready()
The component is now ready to do custom initialization tasks.
|
void |
removePendingTask(String taskKey)
Remove a task from the pending list.
|
<T> ServiceTask<T> |
returnData(Wave sourceWave)
Do a specific action by processing the wave.
|
void |
updateMessage(Wave wave,
String message)
Update the current message of the service task related to the given wave.
|
void |
updateProgress(Wave wave,
double workDone,
double totalWork)
Update the progress of the service task related to the given wave.
|
void |
updateProgress(Wave wave,
double workDone,
double totalWork,
double progressIncrement)
Update the progress of the service task related to the given wave.
|
void |
updateProgress(Wave wave,
long workDone,
long totalWork)
Update the progress of the service task related to the given wave.
|
void |
updateProgress(Wave wave,
long workDone,
long totalWork,
double progressIncrement)
Update the progress of the service task related to the given wave.
|
void |
updateTitle(Wave wave,
String title)
Update the current message of the service task related to the given wave.
|
addBehavior, addBehavior, getBehavior, getBehaviorData, hasBehavior, manageOptionalData
attachUi, callCommand, callCommand, findInnerComponent, getInnerComponentMap, initInnerComponents, initInternalInnerComponents, listen, listen, listen, processWave, release, returnData, rootComponent, rootComponent, sendWave, sendWave, sendWave, setup, unlisten
getCommand, getCommand, getCommands, getCommands, getFirstKeyPart, getKeyPart, getListKeyPart, getModel, getModel, getModels, getModels, getSecondKeyPart, getService, getService, getServices, getServices, getThirdKeyPart, key, key, localFacade, localFacade
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addBehavior, addBehavior, getBehavior, getBehaviorData, hasBehavior
findInnerComponent, listen, listen, listen, rootComponent, rootComponent, sendWave, sendWave, sendWave, unlisten
key, key, localFacade, localFacade, release, setup
attachUi, getModel, getModel, getModels, getModels
getService, getService, getServices, getServices, returnData
callCommand, callCommand, getCommand, getCommand, getCommands, getCommands
public ObservableMap<String,ServiceTask<?>> pendingTasksProperty
ServiceTask
pendingTasksProperty
in interface Service
public AbstractService()
public final void ready() throws CoreException
ready
in class AbstractComponent<Service>
CoreException
- if an error occurredprotected abstract void initService()
public <T> ServiceTask<T> returnData(Wave sourceWave)
returnData
in interface Service
T
- The type of the object to return must be compatible with the WaveType contract that call this servicesourceWave
- the wave that hold all related datapublic ObservableMap<String,ServiceTask<?>> pendingTasksProperty()
ServiceTask
pendingTasksProperty
in interface Service
public Collection<ServiceTask<?>> getPendingTaskList()
getPendingTaskList
in interface Service
public void removePendingTask(String taskKey)
removePendingTask
in interface Service
taskKey
- the key of the task, commonly the WaveUIDpublic ServiceTask<?> getPendingTask(String taskKey)
getPendingTask
in interface Service
taskKey
- the key of the task, commonly the WaveUIDpublic void updateProgress(Wave wave, long workDone, long totalWork)
wave
- the wave that trigger the service task callworkDone
- the amount of overall work donetotalWork
- the amount of total work to dopublic void updateProgress(Wave wave, long workDone, long totalWork, double progressIncrement)
wave
- the wave that trigger the service task callworkDone
- the amount of overall work donetotalWork
- the amount of total work to doprogressIncrement
- the value increment used to filter useless progress eventpublic void updateProgress(Wave wave, double workDone, double totalWork)
wave
- the wave that trigger the service task callworkDone
- the amount of overall work donetotalWork
- the amount of total work to dopublic void updateProgress(Wave wave, double workDone, double totalWork, double progressIncrement)
wave
- the wave that trigger the service task callworkDone
- the amount of overall work donetotalWork
- the amount of total work to doprogressIncrement
- the value increment used to filter useless progress eventpublic void updateMessage(Wave wave, String message)
wave
- the wave that trigger the service task callmessage
- the current message of the service task processedpublic void updateTitle(Wave wave, String title)
wave
- the wave that trigger the service task calltitle
- the title of the service task processedCopyright © 2011–2016 JRebirth OSS. All rights reserved.