TPTP 4.6.0 Platform Project
Public API Specification

org.eclipse.hyades.automation.core
Interface Service

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AbstractProjectSensitiveService, AbstractRelaunchableService, AbstractService, AbstractService, AbstractWorkspaceSensitiveService, ConnectorService, HelloWorldService, KeepAliveService

public interface Service
extends java.io.Serializable

The service interface is a key abstraction in the automation framework, provides the central abstraction for constructing, defining and executing services. Service support in this release is provisional and may deviate from the current API and design in subsequent releases


Nested Class Summary
static interface Service.Discoverable
          The nested interface used to discover if this service exists and is runnable or not
static interface Service.Executable
          The executable interface, used to execute services on both client and server
static interface Service.Memento
          A marker interface to tag a memento and remark it as serializable
static interface Service.Requestable
          The nested requestable interface, to request a service to command
 
Method Summary
 void configure(java.util.Properties properties)
          Configure the properties of this service
 void configure(Service.Memento memento)
          Configure the properties of this service, using a memento that holds these properties -- populate the existing state with state from this memento instead of the equivalent of the set memento call which replaces the state with that memento.
 Service.Memento createMemento()
          Creates a memento for storing and communicating the state between service instances (from outside Eclipse to inside Eclipse)
 java.lang.Object execute()
          Execute the service
 java.lang.Object execute(ProgressiveTask.Synchronicity synchronicity)
          Execute the service
 java.lang.String getIdentifier()
          Returns the identifier for this service
 java.lang.String getRoot()
          Returns the Eclipse root or home directory
 void setMemento(Service.Memento state)
          Sets the state of this service, given the opaque memento
 

Method Detail

configure

void configure(java.util.Properties properties)
Configure the properties of this service

Parameters:
properties - the service properties to attach to this service

configure

void configure(Service.Memento memento)
Configure the properties of this service, using a memento that holds these properties -- populate the existing state with state from this memento instead of the equivalent of the set memento call which replaces the state with that memento. This method does a replace of the properties only.

Parameters:
memento - the memento to use as the source

createMemento

Service.Memento createMemento()
Creates a memento for storing and communicating the state between service instances (from outside Eclipse to inside Eclipse)

Returns:
the opaque memento used to transfer state

execute

java.lang.Object execute()
Execute the service

Returns:
return the return value, the return value currently only contains the java process execute command, unidirectional communication is only possible

execute

java.lang.Object execute(ProgressiveTask.Synchronicity synchronicity)
Execute the service

Parameters:
synchronicity - specifies if this calls blocks or not
Returns:
return the return value, the return value currently only contains the java process execute command, unidirectional communication is only possible

getIdentifier

java.lang.String getIdentifier()
Returns the identifier for this service

Returns:
the service identifier

getRoot

java.lang.String getRoot()
Returns the Eclipse root or home directory

Returns:
returns the root directory

setMemento

void setMemento(Service.Memento state)
Sets the state of this service, given the opaque memento

Parameters:
state - the opaque memento, not opaque to the abstract service code itself though

TPTP 4.6.0 Platform Project
Public API Specification