Class Route

java.lang.Object
services.moleculer.web.router.Route

public class Route extends Object
  • Field Details

    • logger

      protected static final org.slf4j.Logger logger
    • path

      protected String path
    • mappingPolicy

      protected MappingPolicy mappingPolicy
    • opts

      protected services.moleculer.context.CallOptions.Options opts
    • whiteList

      protected String[] whiteList
    • aliases

      protected Alias[] aliases
    • broker

      protected services.moleculer.ServiceBroker broker
    • beforeCall

      protected CallProcessor beforeCall
    • afterCall

      protected CallProcessor afterCall
    • templateEngine

      protected AbstractTemplateEngine templateEngine
    • executor

      protected ExecutorService executor
      Custom Action Executor (null = use the shared ExecutorService of the MessageBroker).
    • routeMiddlewares

      protected final Set<HttpMiddleware> routeMiddlewares
  • Constructor Details

  • Method Details

    • findMapping

      public Mapping findMapping(String httpMethod, String path)
    • use

      public Route use(HttpMiddleware... middlewares)
    • use

      public Route use(Collection<HttpMiddleware> middlewares)
    • started

      public void started(services.moleculer.ServiceBroker broker, Set<HttpMiddleware> globalMiddlewares, boolean debug) throws Exception
      Throws:
      Exception
    • stopped

      public void stopped(Set<HttpMiddleware> globalMiddlewares, boolean debug)
    • toTree

      public io.datatree.Tree toTree()
    • addAlias

      public Route addAlias(String pathPattern, String actionName)
    • addAlias

      public Route addAlias(String httpMethod, String pathPattern, String actionName)
    • addAlias

      public Route addAlias(Alias... aliases)
    • addToWhiteList

      public Route addToWhiteList(String... whiteListEntries)
    • setTemplateEngine

      public void setTemplateEngine(AbstractTemplateEngine templateEngine)
    • getTemplateEngine

      public AbstractTemplateEngine getTemplateEngine()
    • getBeforeCall

      public CallProcessor getBeforeCall()
    • setBeforeCall

      public void setBeforeCall(CallProcessor beforeCall)
    • getAfterCall

      public CallProcessor getAfterCall()
    • setAfterCall

      public void setAfterCall(CallProcessor afterCall)
    • getPath

      public String getPath()
    • getMiddlewares

      public HttpMiddleware[] getMiddlewares()
    • getBroker

      public services.moleculer.ServiceBroker getBroker()
    • getMappingPolicy

      public MappingPolicy getMappingPolicy()
    • getCallOptions

      public services.moleculer.context.CallOptions.Options getCallOptions()
    • getWhiteList

      public String[] getWhiteList()
    • getAliases

      public Alias[] getAliases()
    • setPath

      public void setPath(String path)
    • setMappingPolicy

      public void setMappingPolicy(MappingPolicy mappingPolicy)
    • setCallOptions

      public void setCallOptions(services.moleculer.context.CallOptions.Options opts)
    • setWhiteList

      public void setWhiteList(String... whiteList)
    • setAliases

      public void setAliases(Alias... aliases)
    • getExecutor

      public ExecutorService getExecutor()
    • setExecutor

      public void setExecutor(ExecutorService executor)