Package spark
Class FilterImpl
java.lang.Object
spark.FilterImpl
FilterImpl is created from a path, acceptType and Filter. This is encapsulate the information needed in the route
matcher in a single container.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
FilterImpl
(String path, String acceptType) protected
FilterImpl
(String path, String acceptType, Filter filter) -
Method Summary
Modifier and TypeMethodDescription(package private) static FilterImpl
Wraps the filter in FilterImpl(package private) static FilterImpl
Wraps the filter in FilterImpldelegate()
getPath()
Returns this route's pathabstract void
Invoked when a request is made on this filter's corresponding path e.g.withPrefix
(String prefix) Prefix the path (used forService.path(java.lang.String, spark.RouteGroup)
)
-
Field Details
-
DEFAULT_ACCEPT_TYPE
- See Also:
-
path
-
acceptType
-
delegate
-
-
Constructor Details
-
FilterImpl
-
FilterImpl
-
-
Method Details
-
withPrefix
Prefix the path (used forService.path(java.lang.String, spark.RouteGroup)
)- Parameters:
prefix
- the prefix- Returns:
- itself for easy chaining
-
create
Wraps the filter in FilterImpl- Parameters:
path
- the pathfilter
- the filter- Returns:
- the wrapped route
-
create
Wraps the filter in FilterImpl- Parameters:
path
- the pathacceptType
- the accept typefilter
- the filter- Returns:
- the wrapped route
-
handle
Invoked when a request is made on this filter's corresponding path e.g. '/hello' -
getAcceptType
-
getPath
Returns this route's path -
delegate
-