Package org.spincast.core.routing
Interface RedirectRuleBuilder<R extends RequestContext<?>,W extends WebsocketContext<?>>
- All Known Implementing Classes:
RedirectRuleBuilderDefault
public interface RedirectRuleBuilder<R extends RequestContext<?>,W extends WebsocketContext<?>>
Builder to create a redirection rule.
-
Method Summary
Modifier and TypeMethodDescriptionThe redirection will be permanent (301).pos
(int position) The position where the filter will be run.The redirection will be temporarily (302).void
The new path or full URL to redirect to.void
to
(RedirectHandler<R, W> handler) Will called the specifiedRedirectHandler
to generate the path to redirect to.
-
Method Details
-
permanently
RedirectRuleBuilder<R,W> permanently()The redirection will be permanent (301).This is the default.
-
temporarily
RedirectRuleBuilder<R,W> temporarily()The redirection will be temporarily (302). -
to
The new path or full URL to redirect to.This ends the creation of the redirection rule and save it to the router.
-
to
Will called the specifiedRedirectHandler
to generate the path to redirect to.This ends the creation of the redirection rule and save it to the router.
-
pos
The position where the filter will be run.By using a position below
0
, the redirection will occures even if a main handler would be found.Defaults to -1000.
-