Class ServerConfigEnvProps

All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, Cloneable
Direct Known Subclasses:

public class ServerConfigEnvProps extends PropCnr
This configuration environment defines the configuration setup for the available plug-ins. Several configuration environments may be present in a Server, e.g. "development", "test", "acceptance", "preproduction" and "production".
  • Field Details

  • Constructor Details

    • ServerConfigEnvProps

      public ServerConfigEnvProps()
      Creates the configuration environment properties without a name. The name must be set in all cases using the setPropertyAtom call.
    • ServerConfigEnvProps

      public ServerConfigEnvProps(Atom atom)
      Creates the configuration environment properties with an atom manager.
      atom - The atom.
  • Method Details

    • clone

      public ServerConfigEnvProps clone()
      Creates a clone out of this property. The cloning is overridden by the subclasses in order to handle cloning of its class variables appropriately.
      clone in class PropCnr
      A cloned instance.
    • onPropInvalidateCache

      protected void onPropInvalidateCache()
      Invalidates a potential cache in this property. This method is called during a synchronized state of the property.
      onPropInvalidateCache in class GProp<GProp<?>[]>
    • getDescription

      public String getDescription()
      Gets the description of this configuration environment.
      The description, or null for none.
    • getPluginConfigs

      public ServerPluginConfig[] getPluginConfigs()
      Gets the server plug-in configurations in the environment, normally one per plug-in type.
      A cached value.
    • getServerApplicationSetup

      public IServerApplicationSetupPropCnr[] getServerApplicationSetup(String pluginID)
      Gets the configuration setup's for a plug-in with specified ID. Each plug-in may present several configurations, although most commonly a single one.
      pluginID - The plug-in ID.
      The configuration setup, or null if plug-in configuration is not found. If the plug-in is found but no configurations, an empty array is returned.
    • isUserParallelSessionsAllowed

      public boolean isUserParallelSessionsAllowed()
      Gets the flag indicating if a user is allowed to start multiple parallel sessions or if just one per user and app is allowed (default true).
      The allow flag.
    • getMaxClientsPerAppSession

      public int getMaxClientsPerAppSession()
      Gets the maximum number of clients sessions per app session, zero = no limit.
      The value, default zero.
    • getAppTimeout

      public long getAppTimeout()
      Gets the timeout before an app session is disposed of when no more client sessions are present, default 1 hour.
      The timeout value in milliseconds.
    • getCustomAppValue

      public String getCustomAppValue(String key)
      Gets a value for a key in the custom app properties.
      key - The key or name of the property to retrieve.
      The value, or null if no value is defined for the key, or the custom map is not defined.
    • onAppSessionEndPoint

      public void onAppSessionEndPoint(EndPointPropCnr cnr, AppSessionGyro appGyro)
      Called when a new end point property container is added for a server monitor instance. This is delegated to the plug-ins in the application's server environment in order to enable them to add information for the application session.
      cnr - The container for the end point.
      appGyro - The application session gyro of the end point.
    • getAllowedDomains

      public String getAllowedDomains()
      Gets the allowed domains that are allowed access to this environment.
      The domain name as e.g. "", or null if not associated with Let's Encrypt.
    • getAllowedDomainSet

      public Set<String> getAllowedDomainSet()
      Gets the different domain names as String set. The domains names set includes all defined domain names that are configured for this port.
      A new set of domain names.
    • isTLSRequired

      public boolean isTLSRequired()
      Returns if access to this environment requires TLS.
      true if secured, false if HTTP is accepted.
    • isDomainAccessAllowed

      public boolean isDomainAccessAllowed(String domain, boolean isSecure)
      Checks if a domain is allowed access to this environment. It is assumed that the caller of this method already has checked the validity of the 'host' header with the domain name from the URL.
      domain - The domain name extracted from the URL.
      isSecure - Flag for session secured.
      true for access allowed, false for no access.