Class MappingStrategy

java.lang.Object
org.red5.server.MappingStrategy
All Implemented Interfaces:
IMappingStrategy

public class MappingStrategy extends Object implements IMappingStrategy
Basic mapping strategy implementation. This one uses slash as filesystem path separator, '.service' postfix for services naming, '.handler' for handlers naming and 'default' string as default application name.
  • Field Details

  • Constructor Details

    • MappingStrategy

      public MappingStrategy()
  • Method Details

    • setDefaultApp

      public void setDefaultApp(String defaultApp)
      Setter for default application name ('default' by default).
      Parameters:
      defaultApp - Default application
    • mapResourcePrefix

      public String mapResourcePrefix(String path)
      Resolves resource prefix from path. Default application used as root when path is specified.
      Specified by:
      mapResourcePrefix in interface IMappingStrategy
      Parameters:
      path - Path
      Returns:
      Resource prefix according to this naming strategy
    • mapScopeHandlerName

      public String mapScopeHandlerName(String path)
      Resolves scope handler name for path. Default application used as root when path is specified.
      Specified by:
      mapScopeHandlerName in interface IMappingStrategy
      Parameters:
      path - Path
      Returns:
      Scope handler name according to this naming strategy
    • mapServiceName

      public String mapServiceName(String name)
      Resolves service filename name from name
      Specified by:
      mapServiceName in interface IMappingStrategy
      Parameters:
      name - Service name
      Returns:
      Service filename according to this naming strategy