|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.firstpartners.rp.mid.global.PluginManager
public class PluginManager
Central point to get handle to the plugins available to the system
This
one propogates Events to the loaded plugins.
Nested Class Summary | |
---|---|
(package private) class |
PluginManager.PluginThread
This class is responsable for initialization of the plugin Process of initialzation (onLoad process ) will be made in background |
Field Summary | |
---|---|
private static ICategoryManager |
categoryManager
Category manager |
private static ICategoryStore |
categoryStores
Category store |
private int |
countSearch
Flag to indicate that search processs is active |
private static IFeedbackDataStore |
feedbackDataStores
Feedback store |
private static IIndexManager |
indexManager
Index manager |
protected org.apache.log4j.Logger |
logger
Logger for this class and subclasses |
private static java.lang.String |
m_encodedCredentials
User credentials |
private static java.util.LinkedList |
m_listPluginsInAdd
List of plugins interested in add |
private static java.util.LinkedList |
m_listPluginsInExtract
List of plugins interested in extract data |
private static java.util.LinkedList |
m_listPluginsInFeedback
List of plugins interested in feedback |
private static java.util.LinkedList |
m_listPluginsInFilter
List of plugins interested in filter |
private static java.util.LinkedList |
m_listPluginsInSearch
List of plugins interested in search |
private static java.util.LinkedList |
m_listRunningPlugins
List of the running plugins ( controlled in the search process ) |
private static RPClassLoader |
m_loader
Actual class loader which extends the tomcat.class loader |
private java.util.Collection |
plugins
List of plugins which belongs to the system |
private Proxy |
proxy
Proxy configuration |
private java.lang.String |
root
Root plugins |
Constructor Summary | |
---|---|
protected |
PluginManager()
Creates a new PluginManager object. |
Method Summary | |
---|---|
static void |
addPluginThread(IInterestedInAdd plugin,
INewInformation info)
Add the controller thread formed by plugin and information to the running list in order to be controlled |
private void |
addPluginTypeInAdd(IInterestedInAdd plugin)
Add the plugin to InAdd list |
private void |
addPluginTypeInExtract(IDataExtractor plugin)
Add the plugin to the InExtract list |
private void |
addPluginTypeInFeedback(IInterestedInFeedback plugin)
Add the plugin to InFeedback list |
private void |
addPluginTypeInFilter(IInterestedInResultsFilter plugin)
Add the plugin to InFilter list |
private void |
addPluginTypeInSearch(IInterestedInSearch plugin)
Add the plugin to the InSearch list |
void |
endSearchOp()
A search operation was finished |
static IDataExtractor |
getBestExtractor(INewInformation addInfo)
|
static ICategoryManager |
getCategoryManager()
|
static ICategoryStore |
getCategoryStores()
Get a handle to all the available DataStores (classes) |
static IDataExtractor[] |
getDataExtractors()
Get a handle to all the plugins that can extract data |
static IFeedbackDataStore |
getFeedbackDataStores()
Get a handle to the FeedbackDataStore |
static IIndexManager |
getIndexManager()
|
static IInterestedInAdd[] |
getInterestedInAdd()
Get a handle to all the plugins interested in receiving add events |
static IInterestedInFeedback[] |
getInterestedInFeedback()
Get a handle to all the plugins interested in receiving feedback events |
static IInterestedInResultsFilter[] |
getInterestedInFilterResults()
Get a handle to all the plugins interested in receiving feedback |
static IInterestedInSearch[] |
getInterestedInSearch()
Get a handle to all the plugins interested in receiving Search Events |
java.util.Collection |
getPlugins()
|
Proxy |
getProxy()
|
static java.lang.String |
getProxyCredentials()
Get the proxy credentials in Base64 (sun) encoding |
java.lang.String |
getRoot()
|
static boolean |
isInAddProcess()
Validate if the system is in adding process |
private boolean |
isPlugin(java.lang.Object plugin)
Validate if the specified object is a plugin (implement one of the default IPlugin interfaces). |
(package private) void |
loadPlugins()
'Walks' Directory Tree from point X (specified in config file) and loads all classes that implement the IPlugin interface. |
void |
setCategoryManager(ICategoryManager categoryManager)
|
void |
setCategoryStores(ICategoryStore categoryStore)
|
void |
setFeedbackDataStores(IFeedbackDataStore feedbackDataStore)
|
void |
setIndexManager(IIndexManager indexManager)
|
void |
setPlugins(java.util.Collection plugins)
|
private void |
setPriority(int priority)
Set the low priority for the threads (a search is in running ) |
void |
setProxy(Proxy proxy)
|
void |
setRoot(java.lang.String root)
|
void |
startSearchOp()
A new search operation was invoked into the system |
static void |
storeAndAddDocument(DocumStruct doc)
Add the document structure to the system |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.log4j.Logger logger
private java.lang.String root
private static ICategoryManager categoryManager
private static IIndexManager indexManager
private static ICategoryStore categoryStores
private static IFeedbackDataStore feedbackDataStores
private static java.util.LinkedList m_listPluginsInAdd
private static java.util.LinkedList m_listPluginsInFeedback
private static java.util.LinkedList m_listPluginsInFilter
private static java.util.LinkedList m_listPluginsInSearch
private static java.util.LinkedList m_listPluginsInExtract
private static java.lang.String m_encodedCredentials
private Proxy proxy
private java.util.Collection plugins
private static java.util.LinkedList m_listRunningPlugins
private static RPClassLoader m_loader
private int countSearch
Constructor Detail |
---|
protected PluginManager()
Method Detail |
---|
void loadPlugins() throws RpException
RpException
- If an error must to be signaledprivate boolean isPlugin(java.lang.Object plugin)
plugin
- Plugin object to validate
public static IDataExtractor getBestExtractor(INewInformation addInfo) throws RpException
RpException
public static void storeAndAddDocument(DocumStruct doc)
doc
- DocumentStruct to be added to the system
RpException
public static ICategoryStore getCategoryStores() throws RpException
RpException
- if there are no such plugins available at runtimepublic static IFeedbackDataStore getFeedbackDataStores() throws RpException
RpException
- if there are no such plugins available at runtimepublic static IInterestedInFeedback[] getInterestedInFeedback() throws RpException
RpException
- if there are no such plugins available at runtimepublic static IInterestedInAdd[] getInterestedInAdd() throws RpException
RpException
- if there are no such plugins available at runtimepublic static IInterestedInSearch[] getInterestedInSearch() throws RpException
RpException
- if there are no such plugins available at runtimepublic static IInterestedInResultsFilter[] getInterestedInFilterResults() throws RpException
RpException
- if there are no such plugins available at runtimepublic static IDataExtractor[] getDataExtractors() throws RpException
RpException
- if there are no such plugins available at runtimepublic static void addPluginThread(IInterestedInAdd plugin, INewInformation info)
plugin
- info
- public static boolean isInAddProcess()
private void setPriority(int priority)
public void startSearchOp()
public void endSearchOp()
private void addPluginTypeInAdd(IInterestedInAdd plugin)
plugin
- Plugin object to be addprivate void addPluginTypeInFeedback(IInterestedInFeedback plugin)
plugin
- Plugin object to be addprivate void addPluginTypeInFilter(IInterestedInResultsFilter plugin)
plugin
- Plugin object to be addprivate void addPluginTypeInSearch(IInterestedInSearch plugin)
plugin
- Plugin object to be addprivate void addPluginTypeInExtract(IDataExtractor plugin)
plugin
- Plugin object to be addpublic java.lang.String getRoot()
public void setRoot(java.lang.String root)
root
- The root to set.public static java.lang.String getProxyCredentials()
public static ICategoryManager getCategoryManager()
public void setCategoryManager(ICategoryManager categoryManager)
categoryManager
- The categoryManager to set.public static IIndexManager getIndexManager()
public void setIndexManager(IIndexManager indexManager)
indexManager
- The indexManager to set.public java.util.Collection getPlugins()
public void setPlugins(java.util.Collection plugins)
plugins
- The plugins to set.public Proxy getProxy()
public void setProxy(Proxy proxy)
proxy
- The proxy to set.public void setCategoryStores(ICategoryStore categoryStore)
proxy
- The CategoryStore to set.public void setFeedbackDataStores(IFeedbackDataStore feedbackDataStore)
proxy
- The FeedbackStore to set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |