|
SMILA 1.0 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.impl.AbstractController
public abstract class AbstractController
Base class for Crawler- and AgentController. Contains shared functionality.
Field Summary | |
---|---|
protected java.util.concurrent.locks.ReadWriteLock |
_lock
service methods use read lock, deactivate needs write lock. |
Constructor Summary | |
---|---|
AbstractController()
|
Method Summary | ||
---|---|---|
void |
addComponentFactory(ComponentFactory factory)
Adds a ComponentFactory to the internal List of ComponentFactory. |
|
protected void |
assertNotEmpty(java.lang.String parameterValue,
java.lang.String parameterName)
|
|
protected void |
checkConfiguration(DataSourceConnectionConfig configuration)
check if configuration contains hash and key attributes. |
|
protected
|
createInstance(java.lang.Class<T> clazz,
java.lang.String componentId)
Returns a new Crawler or Agent instance for the given componentId. |
|
boolean |
doCheckForUpdate(DeltaIndexingType deltaIndexingType)
|
|
boolean |
doDeltaDelete(DeltaIndexingType deltaIndexingType)
|
|
boolean |
doDeltaIndexing(DeltaIndexingType deltaIndexingType)
|
|
protected java.util.Collection<java.lang.String> |
getAvailableFactories()
Returns the component names of all available ComponentFactories. |
|
CompoundManager |
getCompoundManager()
|
|
protected DataSourceConnectionConfig |
getConfiguration(java.lang.String bundleId,
java.lang.String dataSourceId)
Returns the DataSourceConnectionConfig for the given dataSourceId. |
|
protected java.util.Collection<java.lang.String> |
getConfigurations(java.lang.String bundleId,
DataConnectionID.DataConnectionType type)
Returns the data source ids of all available configurations of a given DataConnectionType. |
|
ConnectivityManager |
getConnectivityManager()
|
|
DeltaIndexingManager |
getDeltaIndexingManager()
|
|
void |
removeComponentFactory(ComponentFactory factory)
Removes a ComponentFactory from the internal List of ComponentFactory. |
|
void |
setCompoundManager(CompoundManager compoundManager)
Sets the compoundManager. |
|
void |
setConnectivityManager(ConnectivityManager connectivityManager)
Sets the ConnectivityManager. |
|
void |
setDeltaIndexingManager(DeltaIndexingManager diManager)
Sets the DeltaIndexingManager. |
|
void |
unsetCompoundManager(CompoundManager compoundManager)
Set the compoundManager to null. |
|
void |
unsetConnectivityManager(ConnectivityManager connectivityManager)
Set the _connectivityManager to null. |
|
void |
unsetDeltaIndexingManager(DeltaIndexingManager diManager)
Unsets the DeltaIndexingManager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.util.concurrent.locks.ReadWriteLock _lock
Constructor Detail |
---|
public AbstractController()
Method Detail |
---|
public ConnectivityManager getConnectivityManager()
public void setConnectivityManager(ConnectivityManager connectivityManager)
connectivityManager
- the connectivityManager to setpublic void unsetConnectivityManager(ConnectivityManager connectivityManager)
connectivityManager
- the connectivityManager to unsetpublic DeltaIndexingManager getDeltaIndexingManager()
public void setDeltaIndexingManager(DeltaIndexingManager diManager)
diManager
- the DeltaIndexingManager to setpublic void unsetDeltaIndexingManager(DeltaIndexingManager diManager)
diManager
- the DeltaIndexingManager to unsetpublic CompoundManager getCompoundManager()
public void setCompoundManager(CompoundManager compoundManager)
compoundManager
- the compoundManager to setpublic void unsetCompoundManager(CompoundManager compoundManager)
compoundManager
- the compoundManager to unsetpublic void addComponentFactory(ComponentFactory factory)
factory
- the ComponentFactory to addpublic void removeComponentFactory(ComponentFactory factory)
factory
- the ComponentFactory to removeprotected java.util.Collection<java.lang.String> getAvailableFactories()
protected <T> T createInstance(java.lang.Class<T> clazz, java.lang.String componentId) throws ConnectivityException
T
- the return typeclazz
- the class of the created instance (Agent or Crawler)componentId
- the Id of the Crawler or Agent
ConnectivityException
- if no ComponentFactory instance with the given Id could be createdprotected DataSourceConnectionConfig getConfiguration(java.lang.String bundleId, java.lang.String dataSourceId) throws ConnectivityException
bundleId
- the id of the bundledataSourceId
- the Id of the data source
ConnectivityException
- if no DataSource with the given Id existsprotected void checkConfiguration(DataSourceConnectionConfig configuration) throws ConnectivityException
ConnectivityException
protected java.util.Collection<java.lang.String> getConfigurations(java.lang.String bundleId, DataConnectionID.DataConnectionType type)
bundleId
- the id of the bundletype
- the DataConnectionType
protected void assertNotEmpty(java.lang.String parameterValue, java.lang.String parameterName)
java.lang.IllegalArgumentException
- if parameter is null or emptypublic boolean doCheckForUpdate(DeltaIndexingType deltaIndexingType)
ControllerCallback.doCheckForUpdate(DeltaIndexingType)
public boolean doDeltaIndexing(DeltaIndexingType deltaIndexingType)
ControllerCallback.doDeltaIndexing(DeltaIndexingType)
public boolean doDeltaDelete(DeltaIndexingType deltaIndexingType)
ControllerCallback.doDeltaDelete(DeltaIndexingType)
|
SMILA 1.0 API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |