SMILA (incubation) API documentation

org.eclipse.smila.connectivity.framework
Interface AgentController

All Known Implementing Classes:
AgentControllerImpl

public interface AgentController

Management interface for the AgentController.


Field Summary
static java.lang.String PERFORMANCE_AGENT_LOCATION
          The Performance AGENT location.
 
Method Summary
 java.util.Map<java.lang.String,AgentState> getAgentTasksState()
          Gets the status of all agent tasks as a map of data source id and agent state.
 java.util.Collection<java.lang.String> getAvailableAgents()
          returns the AgentController known Agents.
 java.util.Collection<java.lang.String> getAvailableConfigurations()
          returns all available Agent data source configurations.
 boolean hasActiveAgents()
          Checks if there are any active agents.
 int startAgent(java.lang.String dataSourceId)
          Starts an Agent using the given dataSourceId.
 void stopAgent(java.lang.String dataSourceId)
          Stops an active agent using the given dataSourceId.
 

Field Detail

PERFORMANCE_AGENT_LOCATION

static final java.lang.String PERFORMANCE_AGENT_LOCATION
The Performance AGENT location.

See Also:
Constant Field Values
Method Detail

startAgent

int startAgent(java.lang.String dataSourceId)
               throws ConnectivityException
Starts an Agent using the given dataSourceId. This method creates a new Thread. If it is called for a dataSourceId that is currently used by another agent a ConnectivityException is thrown. Returns the hashCode of the agent instance used for performance counter.

Parameters:
dataSourceId - the ID of the data source
Returns:
- the hashcode of the agent instance as int value
Throws:
ConnectivityException - if any error occurs

stopAgent

void stopAgent(java.lang.String dataSourceId)
               throws ConnectivityException
Stops an active agent using the given dataSourceId.

Parameters:
dataSourceId - the ID of the data source
Throws:
ConnectivityException - if any error occurs

hasActiveAgents

boolean hasActiveAgents()
                        throws ConnectivityException
Checks if there are any active agents.

Returns:
true if there are active agents, false otherwise
Throws:
ConnectivityException - if any error occurs

getAgentTasksState

java.util.Map<java.lang.String,AgentState> getAgentTasksState()
Gets the status of all agent tasks as a map of data source id and agent state.

Returns:
a map of data source id and agent state.

getAvailableAgents

java.util.Collection<java.lang.String> getAvailableAgents()
returns the AgentController known Agents.

Returns:
Collection with Strings

getAvailableConfigurations

java.util.Collection<java.lang.String> getAvailableConfigurations()
returns all available Agent data source configurations.

Returns:
List with Strings of all available Agent data source configurations

SMILA (incubation) API documentation