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());
}
}