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.Collection<java.lang.String> getActiveAgents()
          Returns a Collection of Strings containing the dataSourceIds of the currently active agents.
 java.util.Collection<java.lang.String> getAvailableAgents()
          returns the AgentController known Agents.
 AgentState getState(java.lang.String dataSourceId)
          Returns the AgentState of the agent with the given dataSourceId.
 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

getActiveAgents

java.util.Collection<java.lang.String> getActiveAgents()
                                                       throws ConnectivityException
Returns a Collection of Strings containing the dataSourceIds of the currently active agents.

Returns:
a Collection of Strings containing the dataSourceIds
Throws:
ConnectivityException - if any error occurs

getState

AgentState getState(java.lang.String dataSourceId)
                    throws ConnectivityException
Returns the AgentState of the agent with the given dataSourceId.

Parameters:
dataSourceId - the ID of the data source to get the state
Returns:
the AgentState
Throws:
ConnectivityException - if any error occurs

getAvailableAgents

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

Returns:
Collection with Strings

SMILA (incubation) API documentation