Class ServerNameActivationStrategy

java.lang.Object
org.togglz.servlet.activation.ServerNameActivationStrategy
All Implemented Interfaces:
org.togglz.core.spi.ActivationStrategy

public class ServerNameActivationStrategy extends Object implements org.togglz.core.spi.ActivationStrategy
Activation strategy that will use the server name used in the request to decide if the feature is active or not. This strategy can be useful when given service instance is available through two different virtual host names (like www.example.com and beta.example.com) each with different features enabled.
Author:
Marcin ZajÄ…czkowski, 2014-04-28
  • Constructor Details

    • ServerNameActivationStrategy

      public ServerNameActivationStrategy()
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface org.togglz.core.spi.ActivationStrategy
    • getName

      public String getName()
      Specified by:
      getName in interface org.togglz.core.spi.ActivationStrategy
    • isActive

      public boolean isActive(org.togglz.core.repository.FeatureState featureState, org.togglz.core.user.FeatureUser user)
      Specified by:
      isActive in interface org.togglz.core.spi.ActivationStrategy
    • getParameters

      public org.togglz.core.activation.Parameter[] getParameters()
      Specified by:
      getParameters in interface org.togglz.core.spi.ActivationStrategy