net.jetrix.filter
Class FilterManager

java.lang.Object
  extended by net.jetrix.filter.FilterManager

public class FilterManager
extends Object

Manages channel filters. Filter instances are obtained by calling the getFilter() method. The FilterManager is in charge to serve a new instance of the filter or the same unique instance depending on the type of the filter (static or not).

Version:
$Revision: 550 $, $Date: 2005-01-06 13:26:21 +0100 (jeu., 06 janv. 2005) $
Author:
Emmanuel Bourg

Method Summary
 void addFilterAlias(String name, String classname)
          Defines a new alias for a filter.
 MessageFilter getFilter(String classname)
          Returns a filter of the specified class.
 Map<String,String> getFilterAliases()
          Return the map of filter aliases
 MessageFilter getFilterByName(String name)
          Returns a filter matching the specified name.
static FilterManager getInstance()
          Returns the instance of the FilterManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static FilterManager getInstance()
Returns the instance of the FilterManager.


getFilter

public MessageFilter getFilter(String classname)
                        throws FilterException
Returns a filter of the specified class. If the filter is declared as a shared, the instance will be stored and returned on further calls for the same filter.

Parameters:
classname - Classname of the filter to return
Returns:
Filter of the specified class.
Throws:
FilterException

getFilterByName

public MessageFilter getFilterByName(String name)
                              throws FilterException
Returns a filter matching the specified name.

Parameters:
name - name of the filter to return
Returns:
Filter of the specified class.
Throws:
FilterException

addFilterAlias

public void addFilterAlias(String name,
                           String classname)
Defines a new alias for a filter.

Parameters:
name - alias of the filter
classname - class of the filter

getFilterAliases

public Map<String,String> getFilterAliases()
Return the map of filter aliases

Since:
0.2


Copyright © 2001-2008 Emmanuel Bourg. All Rights Reserved.