Class ServletConfiguration

All Implemented Interfaces:
Configuration, EventSource, ImmutableConfiguration, SynchronizerSupport

public class ServletConfiguration extends BaseWebConfiguration
A configuration wrapper around a ServletConfig. This configuration is read only, adding or removing a property will throw an UnsupportedOperationException.
Since:
1.1
  • Field Details

    • config

      protected javax.servlet.ServletConfig config
      Stores a reference to the wrapped ServletConfig.
  • Constructor Details

    • ServletConfiguration

      public ServletConfiguration(javax.servlet.Servlet servlet)
      Creates a ServletConfiguration using the initialization parameter of the specified servlet.
      Parameters:
      servlet - the servlet
    • ServletConfiguration

      public ServletConfiguration(javax.servlet.ServletConfig config)
      Creates a ServletConfiguration using the servlet initialization parameters.
      Parameters:
      config - the servlet configuration
  • Method Details

    • getPropertyInternal

      protected Object getPropertyInternal(String key)
      Description copied from class: AbstractConfiguration
      Actually obtains the value of the specified property. This method is called by getProperty(). Concrete subclasses must define it to fetch the value of the desired property.
      Specified by:
      getPropertyInternal in class AbstractConfiguration
      Parameters:
      key - the key of the property in question
      Returns:
      the (raw) value of this property
    • getKeysInternal

      protected Iterator<String> getKeysInternal()
      Description copied from class: AbstractConfiguration
      Actually creates an iterator for iterating over the keys in this configuration. This method is called by getKeys(), it has to be defined by concrete subclasses.
      Specified by:
      getKeysInternal in class AbstractConfiguration
      Returns:
      an Iterator with all property keys in this configuration