Class SpincastRouterDeps<R extends org.spincast.core.exchange.RequestContext<?>,W extends org.spincast.core.websocket.WebsocketContext<?>>

java.lang.Object
org.spincast.plugins.routing.SpincastRouterDeps<R,W>

public class SpincastRouterDeps<R extends org.spincast.core.exchange.RequestContext<?>,W extends org.spincast.core.websocket.WebsocketContext<?>> extends Object
A wrapper object for the dependencies required by SpincastRouter. We inject this wrapper instead of injecting each individual dependency. We do this because the SpincastRouter is made to be extended frequently by developers and :
  • We want it to be easily extended without having to inject too many dependencies in the child class.
  • We want to keep using constructor injection instead of setter and field injection.
  • By using a wrapper, we can add new dependencies to SpincastRouter without breaking the client classes.
  • Constructor Details

    • SpincastRouterDeps

      @Inject public SpincastRouterDeps(SpincastRouterConfig spincastRouterConfig, RouteFactory<R> routeFactory, org.spincast.core.config.SpincastConfig spincastConfig, org.spincast.core.dictionary.Dictionary dictionary, org.spincast.core.server.Server server, org.spincast.core.filters.SpincastFilters<R> spincastFilters, org.spincast.core.routing.RouteBuilderFactory<R,W> routeBuilderFactory, org.spincast.core.routing.RedirectRuleBuilderFactory<R,W> redirectRuleBuilderFactory, org.spincast.core.routing.StaticResourceBuilderFactory<R,W> staticResourceBuilderFactory, RouteHandlerMatchFactory<R> routeHandlerMatchFactory, org.spincast.core.routing.StaticResourceFactory<R> staticResourceFactory, org.spincast.core.websocket.WebsocketRouteBuilderFactory<R,W> websocketRouteBuilderFactory, org.spincast.core.websocket.WebsocketRouteHandlerFactory<R,W> websocketRouteHandlerFactory, SpincastRoutingUtils spincastRoutingUtils, org.spincast.core.locale.LocaleResolver localeResolver)
      Constructor
  • Method Details

    • getRouteHandlerMatchFactory

      public RouteHandlerMatchFactory<R> getRouteHandlerMatchFactory()
    • getRouteBuilderFactory

      public org.spincast.core.routing.RouteBuilderFactory<R,W> getRouteBuilderFactory()
    • getRedirectRuleBuilderFactory

      public org.spincast.core.routing.RedirectRuleBuilderFactory<R,W> getRedirectRuleBuilderFactory()
    • getStaticResourceBuilderFactory

      public org.spincast.core.routing.StaticResourceBuilderFactory<R,W> getStaticResourceBuilderFactory()
    • getStaticResourceFactory

      public org.spincast.core.routing.StaticResourceFactory<R> getStaticResourceFactory()
    • getSpincastRouterConfig

      public SpincastRouterConfig getSpincastRouterConfig()
    • getRouteFactory

      public RouteFactory<R> getRouteFactory()
    • getSpincastConfig

      public org.spincast.core.config.SpincastConfig getSpincastConfig()
    • getDictionary

      public org.spincast.core.dictionary.Dictionary getDictionary()
    • getSpincastFilters

      public org.spincast.core.filters.SpincastFilters<R> getSpincastFilters()
    • getWebsocketRouteBuilderFactory

      public org.spincast.core.websocket.WebsocketRouteBuilderFactory<R,W> getWebsocketRouteBuilderFactory()
    • getWebsocketRouteHandlerFactory

      public org.spincast.core.websocket.WebsocketRouteHandlerFactory<R,W> getWebsocketRouteHandlerFactory()
    • getServer

      public org.spincast.core.server.Server getServer()
    • getSpincastRoutingUtils

      public SpincastRoutingUtils getSpincastRoutingUtils()
    • getLocaleResolver

      public org.spincast.core.locale.LocaleResolver getLocaleResolver()