|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.connectivity.framework.AbstractAgent
public abstract class AbstractAgent
Abstract base class for Agent implementations.
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
_log
The logger. |
protected AgentPerformanceCounterHelper<ConnectivityPerformanceAgent> |
_performanceCounters
The _counter helper. |
| Constructor Summary | |
|---|---|
AbstractAgent()
Default Constructor. |
|
| Method Summary | |
|---|---|
protected void |
activate(ComponentContext context)
Activate the component. |
protected void |
deactivate(ComponentContext context)
Deactivate the component. |
java.lang.String |
getAgentId()
Returns the Agent Id, which is the OSGi DecarativeService Component Name. |
AgentState |
getAgentState()
Gets the AgentState. |
protected long |
getAttachmentsByteLength(Record record)
Gets the attachments bytes length. |
protected DataSourceConnectionConfig |
getConfig()
Gets the DataSourceConnectionConfig. |
protected AgentControllerCallback |
getControllerCallback()
Gets the AgentControllerCallback. |
AgentPerformanceCounterHelper<ConnectivityPerformanceAgent> |
getCounterHelper()
|
protected java.lang.String |
getSessionId()
Returns the delta indexing session id. |
protected abstract void |
initialize()
Method to contain initialization of the agent. |
protected void |
initializePerformanceCounterHelper()
creates a new AgentPerformanceCounterHelper instance. |
protected boolean |
isStopThread()
Returns the value of the flag _stopThread. |
void |
start(AgentControllerCallback controllerCallback,
AgentState agentState,
DataSourceConnectionConfig config,
java.lang.String sessionId)
Starts the agent using the given configuration, creating a new internal thread. |
void |
stop()
Stops the agent. |
protected void |
stopThread()
Stops the agent thread. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.Runnable |
|---|
run |
| Field Detail |
|---|
protected org.apache.commons.logging.Log _log
protected AgentPerformanceCounterHelper<ConnectivityPerformanceAgent> _performanceCounters
| Constructor Detail |
|---|
public AbstractAgent()
| Method Detail |
|---|
public java.lang.String getAgentId()
throws AgentException
getAgentId in interface AgentAgentException - if any error occurspublic AgentState getAgentState()
public void start(AgentControllerCallback controllerCallback,
AgentState agentState,
DataSourceConnectionConfig config,
java.lang.String sessionId)
throws AgentException
start in interface AgentcontrollerCallback - reference to the interface AgentControllerCallbackagentState - the AgentStateconfig - the DataSourceConnectionConfigsessionId - the delta indexing session id
AgentException - if any error occursAgent.start(AgentControllerCallback, AgentState,
DataSourceConnectionConfig, String)public AgentPerformanceCounterHelper<ConnectivityPerformanceAgent> getCounterHelper()
getCounterHelper in interface Agentprotected void initializePerformanceCounterHelper()
public void stop()
throws AgentException
stop in interface AgentAgentException - if any error occursAgent.stop()protected boolean isStopThread()
protected void stopThread()
protected AgentControllerCallback getControllerCallback()
protected DataSourceConnectionConfig getConfig()
protected java.lang.String getSessionId()
protected void activate(ComponentContext context)
context - the ComponentContextprotected void deactivate(ComponentContext context)
context - the ComponentContext
protected abstract void initialize()
throws AgentException
AgentException - if any error occursprotected long getAttachmentsByteLength(Record record)
record - the record
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||