public abstract class AbstractRemoteExternalSystemService<S extends ExternalSystemExecutionSettings> extends java.lang.Object implements RemoteExternalSystemService<S>
Constructor and Description |
---|
AbstractRemoteExternalSystemService() |
Modifier and Type | Method and Description |
---|---|
protected <T> T |
execute(ExternalSystemTaskId id,
java.util.function.Supplier<? extends T> task) |
ExternalSystemTaskNotificationListener |
getNotificationListener() |
S |
getSettings() |
java.util.Map<ExternalSystemTaskType,java.util.Set<ExternalSystemTaskId>> |
getTasksInProgress()
Allows to ask current service for all tasks being executed at the moment.
|
boolean |
isTaskInProgress(ExternalSystemTaskId id)
Allows to check if current service executes the target task.
|
void |
setNotificationListener(ExternalSystemTaskNotificationListener listener)
Allows to define notification callback to use within the current service
|
void |
setSettings(S settings)
Provides the service settings to use.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cancelTask
protected <T> T execute(ExternalSystemTaskId id, java.util.function.Supplier<? extends T> task)
public void setSettings(S settings)
RemoteExternalSystemService
setSettings
in interface RemoteExternalSystemService<S extends ExternalSystemExecutionSettings>
settings
- settings to usepublic S getSettings()
public void setNotificationListener(ExternalSystemTaskNotificationListener listener)
RemoteExternalSystemService
setNotificationListener
in interface RemoteExternalSystemService<S extends ExternalSystemExecutionSettings>
listener
- notification listener to use with the current servicepublic ExternalSystemTaskNotificationListener getNotificationListener()
public boolean isTaskInProgress(ExternalSystemTaskId id)
ExternalSystemTaskAware
isTaskInProgress
in interface ExternalSystemTaskAware
id
- target task's idtrue
if a task with the given id is executed at the moment by the current service;
false
otherwisepublic java.util.Map<ExternalSystemTaskType,java.util.Set<ExternalSystemTaskId>> getTasksInProgress()
ExternalSystemTaskAware
getTasksInProgress
in interface ExternalSystemTaskAware