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.
 AgentPerformanceCounterHelper<? extends ConnectivityPerformanceAgent> getPerformanceCounterHelper(java.lang.String dataSourceId)
           
 boolean hasActiveAgents()
          Checks if there are any active agents.
 int startAgent(java.lang.String dataSourceId, java.lang.String jobName)
          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,
               java.lang.String jobName)
               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 an id for this agent instance that can be used to identify the performance counters agents.

Parameters:
dataSourceId - the ID of the data source
jobName - name of the JobManager job to submit the records to.
Returns:
the agent import run ID.
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

getPerformanceCounterHelper

AgentPerformanceCounterHelper<? extends ConnectivityPerformanceAgent> getPerformanceCounterHelper(java.lang.String dataSourceId)
Parameters:
dataSourceId -
Returns:
CrawlerPerformanceCounterHelper for the given data source id.

SMILA (incubation) API documentation