|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.krakenapps.filter.impl.DefaultFilterManager
public class DefaultFilterManager
This class provides default implementation for the FilterManager
interface.
| Constructor Summary | |
|---|---|
DefaultFilterManager(org.osgi.framework.BundleContext context)
|
|
| Method Summary | |
|---|---|
void |
bindFilter(java.lang.String fromFilterId,
java.lang.String toFilterId)
Binds two filters. |
Filter |
getFilter(java.lang.String filterId)
Returns the filter |
java.util.List<java.lang.String> |
getFilterFactoryNames()
Returns a list of filter factory type name. |
java.util.List<ComponentDescription> |
getFilterInstanceDescriptions()
Returns a list of all filter instance descriptions. |
Filter[] |
getInputFilters(java.lang.String filterId)
Returns all bound input filters. |
Filter[] |
getOutputFilters(java.lang.String filterId)
Returns all bound output filters. |
java.lang.Object |
getProperty(java.lang.String filterId,
java.lang.String key)
Returns the value of the property. |
java.util.Set<java.lang.String> |
getPropertyKeys(java.lang.String filterId)
Returns a Set of property keys |
void |
loadFilter(int filterTypeIndex,
java.lang.String filterId)
Loads a filter using filter factory index. |
void |
loadFilter(java.lang.String factoryName,
java.lang.String filterId)
Loads a filter using the filter factory name. |
void |
registerFilter(FilterHandler filterHandler,
java.lang.String filterId,
Filter filter)
Register the filter with filter id and handler. |
void |
runFilter(java.lang.String filterId,
long period)
Starts an ActiveFilter thread with specified milliseconds
interval. |
void |
setProperty(java.lang.String filterId,
java.lang.String key,
java.lang.String value)
Sets the property. |
void |
stopFilter(java.lang.String filterId)
Stops the active filter. |
void |
subscribeFilterEvent(FilterEventListener listener)
Subscribes filter events. |
void |
unbindFilter(java.lang.String fromFilterId,
java.lang.String toFilterId)
Unbind filters. |
void |
unloadFilter(java.lang.String filterId)
Unloads the filter. |
void |
unregisterFilter(java.lang.String filterId)
Unregister the filter. |
void |
unsetProperty(java.lang.String filterId,
java.lang.String key)
Removes the property. |
void |
unsubscribeFilterEvent(FilterEventListener listener)
Unsubscribes filter events. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultFilterManager(org.osgi.framework.BundleContext context)
| Method Detail |
|---|
public void loadFilter(int filterTypeIndex,
java.lang.String filterId)
throws FilterFactoryNotFoundException,
DuplicatedFilterNameException
FilterManager
loadFilter in interface FilterManagerfilterTypeIndex - the filter factory index which is listed before.filterId - the filter id
FilterFactoryNotFoundException - if filter factory is not found
DuplicatedFilterNameException - if filter id is duplicated
public void loadFilter(java.lang.String factoryName,
java.lang.String filterId)
throws FilterFactoryNotFoundException,
DuplicatedFilterNameException
FilterManager
loadFilter in interface FilterManagerfactoryName - the filter factory namefilterId - the filter id
FilterFactoryNotFoundException - if filter factory is not found
DuplicatedFilterNameException - if filter id is duplicated
public void unloadFilter(java.lang.String filterId)
throws FilterNotFoundException
FilterManager
unloadFilter in interface FilterManagerfilterId - the filter id
FilterNotFoundException - if filter is not found
public void runFilter(java.lang.String filterId,
long period)
throws FilterNotFoundException,
java.lang.IllegalThreadStateException
FilterManagerActiveFilter thread with specified milliseconds
interval.
runFilter in interface FilterManagerfilterId - the ActiveFilter idperiod - the sleep interval in milliseconds
FilterNotFoundException - if active filter is not found
java.lang.IllegalThreadStateException - if active filter is already running
public void stopFilter(java.lang.String filterId)
throws FilterNotFoundException
FilterManager
stopFilter in interface FilterManagerfilterId - the ActiveFilter id
FilterNotFoundException - if active filter is not found
public void registerFilter(FilterHandler filterHandler,
java.lang.String filterId,
Filter filter)
FilterManagerFilterHandler.
registerFilter in interface FilterManagerfilterHandler - the filter handlerfilterId - the filter idfilter - the filterpublic void unregisterFilter(java.lang.String filterId)
FilterManagerFilterHandler.
unregisterFilter in interface FilterManagerfilterId - the filter idpublic java.util.List<java.lang.String> getFilterFactoryNames()
FilterManager
getFilterFactoryNames in interface FilterManagerpublic java.util.List<ComponentDescription> getFilterInstanceDescriptions()
FilterManager
getFilterInstanceDescriptions in interface FilterManager
public void bindFilter(java.lang.String fromFilterId,
java.lang.String toFilterId)
throws FilterNotFoundException,
AlreadyBoundException,
MessageSpecMismatchException
FilterManager
bindFilter in interface FilterManagerfromFilterId - the source filter idtoFilterId - the destination filter id
FilterNotFoundException - if source or destination filter is not found
AlreadyBoundException - if filters are already bound
MessageSpecMismatchException - if source filter's message specification and destinatino
filter's message specification is not matched.
public void unbindFilter(java.lang.String fromFilterId,
java.lang.String toFilterId)
throws FilterNotFoundException,
FilterNotBoundException
FilterManager
unbindFilter in interface FilterManagerfromFilterId - the source filter idtoFilterId - the destination filter id
FilterNotFoundException - if source or destination filter is not found
FilterNotBoundException - if filters are not boundpublic Filter[] getInputFilters(java.lang.String filterId)
FilterManager
getInputFilters in interface FilterManagerfilterId - the filter id
public Filter[] getOutputFilters(java.lang.String filterId)
FilterManager
getOutputFilters in interface FilterManagerfilterId - the filter id
public java.lang.Object getProperty(java.lang.String filterId,
java.lang.String key)
throws FilterNotFoundException
FilterManager
getProperty in interface FilterManagerfilterId - the filter idkey - the key of property
FilterNotFoundException - if filter is not found
public java.util.Set<java.lang.String> getPropertyKeys(java.lang.String filterId)
throws FilterNotFoundException
FilterManager
getPropertyKeys in interface FilterManagerfilterId - the filter id
FilterNotFoundException - if filter is not found
public void setProperty(java.lang.String filterId,
java.lang.String key,
java.lang.String value)
throws FilterNotFoundException
FilterManager
setProperty in interface FilterManagerfilterId - the filter idkey - the key of propertyvalue - the value of property
FilterNotFoundException - if filter is not found
public void unsetProperty(java.lang.String filterId,
java.lang.String key)
throws FilterNotFoundException
FilterManager
unsetProperty in interface FilterManagerfilterId - the filter idkey - the key of property
FilterNotFoundException - if filter is not foundpublic Filter getFilter(java.lang.String filterId)
FilterManager
getFilter in interface FilterManagerfilterId - the filter id
public void subscribeFilterEvent(FilterEventListener listener)
FilterManager
subscribeFilterEvent in interface FilterManagerlistener - the filter event listenerpublic void unsubscribeFilterEvent(FilterEventListener listener)
FilterManager
unsubscribeFilterEvent in interface FilterManagerlistener - the filter event listener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||