480898 - Introduce FilterMapping.getDispatcherTypes() method

This commit is contained in:
Joakim Erdfelt 2015-10-28 09:42:38 -07:00
parent a0dca5af59
commit b64b1d98e0
1 changed files with 17 additions and 0 deletions

View File

@ -192,6 +192,23 @@ public class FilterMapping implements Dumpable
}
}
/* ------------------------------------------------------------ */
public EnumSet<DispatcherType> getDispatcherTypes()
{
EnumSet<DispatcherType> dispatcherTypes = EnumSet.noneOf(DispatcherType.class);
if ((_dispatches & ERROR) == ERROR)
dispatcherTypes.add(DispatcherType.ERROR);
if ((_dispatches & FORWARD) == FORWARD)
dispatcherTypes.add(DispatcherType.FORWARD);
if ((_dispatches & INCLUDE) == INCLUDE)
dispatcherTypes.add(DispatcherType.INCLUDE);
if ((_dispatches & REQUEST) == REQUEST)
dispatcherTypes.add(DispatcherType.REQUEST);
if ((_dispatches & ASYNC) == ASYNC)
dispatcherTypes.add(DispatcherType.ASYNC);
return dispatcherTypes;
}
/* ------------------------------------------------------------ */
/**
* @param dispatches The dispatches to set.