public abstract class AbstractExternalSystemFacadeImpl<S extends ExternalSystemExecutionSettings> extends RemoteServer implements RemoteExternalSystemFacade<S>
RemoteServer.Jndi
SERVER_HOSTNAME
NULL_OBJECT
Constructor and Description |
---|
AbstractExternalSystemFacadeImpl(java.lang.Class<ExternalSystemProjectResolver<S>> projectResolverClass,
java.lang.Class<ExternalSystemTaskManager<S>> buildManagerClass) |
Modifier and Type | Method and Description |
---|---|
void |
applyProgressManager(RemoteExternalSystemProgressNotificationManager progressManager)
Asks remote external system process to use given progress manager.
|
void |
applySettings(S settings)
Asks remote external system process to apply given settings.
|
boolean |
cancelTask(ExternalSystemTaskId id)
Allows to cancel the target task by the current service.
|
protected abstract <I extends RemoteExternalSystemService<S>,C extends I> |
createService(java.lang.Class<I> interfaceClass,
C impl)
Generic method to retrieve exposed implementations of the target interface.
|
protected ExternalSystemTaskNotificationListener |
getNotificationListener() |
<any> |
getRawProjectResolver()
Same as
RemoteExternalSystemFacade.getResolver() , but operating on raw result |
RemoteExternalSystemProjectResolver<S> |
getResolver()
Exposes
'resolve external system project' service that works at another process. |
protected S |
getSettings() |
RemoteExternalSystemTaskManager<S> |
getTaskManager()
Exposes
'run external system task' service which works at another process. |
java.util.Map<ExternalSystemTaskType,java.util.Set<ExternalSystemTaskId>> |
getTasksInProgress()
Allows to ask current service for all tasks being executed at the moment.
|
protected void |
init() |
boolean |
isTaskInProgress(ExternalSystemTaskId id)
Allows to check if current service executes the target task.
|
setupRMI, start
public AbstractExternalSystemFacadeImpl(java.lang.Class<ExternalSystemProjectResolver<S>> projectResolverClass, java.lang.Class<ExternalSystemTaskManager<S>> buildManagerClass) throws java.lang.IllegalAccessException, java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.InstantiationException
protected void init() throws java.rmi.RemoteException
java.rmi.RemoteException
protected S getSettings()
protected ExternalSystemTaskNotificationListener getNotificationListener()
public RemoteExternalSystemProjectResolver<S> getResolver() throws java.lang.IllegalStateException
RemoteExternalSystemFacade
'resolve external system project'
service that works at another process.getResolver
in interface RemoteExternalSystemFacade<S extends ExternalSystemExecutionSettings>
'resolve external system project'
servicejava.lang.IllegalStateException
- in case of inability to create the servicepublic <any> getRawProjectResolver() throws java.lang.IllegalStateException
RemoteExternalSystemFacade
RemoteExternalSystemFacade.getResolver()
, but operating on raw resultgetRawProjectResolver
in interface RemoteExternalSystemFacade<S extends ExternalSystemExecutionSettings>
java.lang.IllegalStateException
public RemoteExternalSystemTaskManager<S> getTaskManager()
RemoteExternalSystemFacade
'run external system task'
service which works at another process.getTaskManager
in interface RemoteExternalSystemFacade<S extends ExternalSystemExecutionSettings>
protected abstract <I extends RemoteExternalSystemService<S>,C extends I> I createService(java.lang.Class<I> interfaceClass, C impl) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.rmi.RemoteException
I
- service interface classC
- service implementationinterfaceClass
- target service interface classimpl
- service implementationjava.lang.IllegalAccessException
- in case of incorrect assumptions about server class interfacejava.lang.InstantiationException
- in case of incorrect assumptions about server class interfacejava.lang.ClassNotFoundException
- in case of incorrect assumptions about server class interfacejava.rmi.RemoteException
public boolean isTaskInProgress(ExternalSystemTaskId id) throws java.rmi.RemoteException
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
otherwisejava.rmi.RemoteException
- as required by RMIpublic java.util.Map<ExternalSystemTaskType,java.util.Set<ExternalSystemTaskId>> getTasksInProgress() throws java.rmi.RemoteException
ExternalSystemTaskAware
getTasksInProgress
in interface ExternalSystemTaskAware
java.rmi.RemoteException
- as required by RMIpublic void applySettings(S settings) throws java.rmi.RemoteException
RemoteExternalSystemFacade
applySettings
in interface RemoteExternalSystemFacade<S extends ExternalSystemExecutionSettings>
settings
- settings to applyjava.rmi.RemoteException
- in case of unexpected I/O exception during processingpublic void applyProgressManager(RemoteExternalSystemProgressNotificationManager progressManager) throws java.rmi.RemoteException
RemoteExternalSystemFacade
applyProgressManager
in interface RemoteExternalSystemFacade<S extends ExternalSystemExecutionSettings>
progressManager
- progress manager to usejava.rmi.RemoteException
- in case of unexpected I/O exception during processingpublic boolean cancelTask(ExternalSystemTaskId id) throws java.rmi.RemoteException
ExternalSystemTaskAware
cancelTask
in interface ExternalSystemTaskAware
id
- target task's idtrue
if a task was successfully canceled;
false
otherwisejava.rmi.RemoteException
- as required by RMI