diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterMapping.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterMapping.java index 897818510e7..bdcacd123ad 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterMapping.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterMapping.java @@ -192,6 +192,23 @@ public class FilterMapping implements Dumpable } } + /* ------------------------------------------------------------ */ + public EnumSet getDispatcherTypes() + { + EnumSet 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.