FileDocCategorySizeDatePackage
FilterRouter.javaAPI DocGlassfish v2 API3868Fri May 04 22:24:42 BST 2007com.sun.enterprise.admin.wsmgmt.filter.spi

FilterRouter

public class FilterRouter extends Object
This class routes a web service management funtion to an appropriate filter.

Fields Summary
private static FilterRouter
fr
private static final Logger
_logger
private static final com.sun.enterprise.util.i18n.StringManager
_stringMgr
Constructors Summary
private FilterRouter()


      
Methods Summary
public voidapplyFilters(java.lang.String stage, FilterContext context)
Applies filter for an endpoint during a particular stage of its processing.


        if ( context == null) {
            return;
        }

        String endpoint = context.getFullyQualifiedName();

        FilterRegistry fm = FilterRegistry.getInstance();

        if ( fm.isManaged(endpoint) == false) {
            return;
        }
        
        List filters = fm.getFilters(stage, endpoint); 
        if (filters == null) {
            return;
        }
        ListIterator filterItr = filters.listIterator();
        while ( filterItr.hasNext() ) {
            Filter f = (Filter) filterItr.next();
            try {
                f.process(stage, endpoint, context);
            } catch (Exception e) {
                // log a fine message
                _logger.fine("Filter execution for endpoint " + endpoint + " failed: " + e.getMessage());
            }
        }
    
public static synchronized com.sun.enterprise.admin.wsmgmt.filter.spi.FilterRoutergetInstance()

        if ( fr == null) {
            fr = new FilterRouter();
        }
        return fr;