Class ContainerConfiguration


  • public class ContainerConfiguration
    extends Object
    The configuration of the container.
    Author:
    Fabio Simeoni, Luca Frosini (ISTI - CNR)
    • Constructor Detail

      • ContainerConfiguration

        public ContainerConfiguration()
    • Method Detail

      • mode

        public Mode mode()
        Returns the management mode for the container.
        Returns:
        the management mode
      • mode

        public ContainerConfiguration mode​(Mode mode)
        Sets the management mode for the container.
        Parameters:
        mode - the management mode
        Returns:
        this configuration
      • apps

        public List<ApplicationConfiguration> apps()
        Returns the application configurations included in this configuration.
        Returns:
        the application configurations
      • app

        public ApplicationConfiguration app​(String context)
        Returns the configuration of an application with a given context path.
        Parameters:
        context - the context path
        Returns:
        the application configuration
      • site

        public Site site()
        Returns the geographical site of the container.
        Returns:
        the site
      • site

        public ContainerConfiguration site​(Site site)
        Sets the geographical site of the container.
        Parameters:
        site - the site
        Returns:
        this configuration
      • infrastructure

        public String infrastructure()
        Returns the infrastructure in which the container is running.
        Returns:
        the infrastructure
      • infrastructure

        public ContainerConfiguration infrastructure​(String infrastructure)
        Sets the infrastructure in which the container is running.
        Parameters:
        infrastructure - the infrastructure
        Returns:
        this configuration
      • hostname

        public String hostname()
        Returns the host name of the container.
        Returns:
        the host name;
      • hostname

        public ContainerConfiguration hostname​(String name)
        Sets the host name of the container.
        Parameters:
        name - the host name
        Returns:
        this configuration
      • port

        public int port()
        Returns the port at which the container is listening for requests.
        Returns:
        the port
      • protocol

        public String protocol()
        Returns the port at which the container is listening for requests.
        Returns:
        the port
      • authenticationEnpoint

        public String authenticationEnpoint()
      • port

        public ContainerConfiguration port​(int port)
        Sets the port at which the container is listening for requests.
        Parameters:
        port - the port
        Returns:
        this configuration
      • authorizeChildrenContext

        public boolean authorizeChildrenContext()
      • authorizeChildrenContext

        public ContainerConfiguration authorizeChildrenContext​(boolean authorizeChildrenContext)
      • startTokens

        public List<String> startTokens()
        Returns the VOs in which the container initially operates.
        Returns:
        the VOs
      • startTokens

        public ContainerConfiguration startTokens​(List<String> tokens)
        Sets the VOs in which the container initially operates.
        Parameters:
        vos - the VOs
        Returns:
        this configuration
      • persistence

        public Persistence persistence()
        Returns the persistence manager of the container.
        Returns:
        the manager
      • persistence

        public ContainerConfiguration persistence​(Persistence manager)
        Sets the persistence manager of the container.
        Parameters:
        manager - the manager
        Returns:
        this configuration
      • properties

        public Map<String,​String> properties()
        Returns the configuration properties of the container.
        Returns:
        the properties
      • property

        public ContainerConfiguration property​(String name,
                                               String value)
        Adds a configuration property to the container.
        Parameters:
        the - name of the property
        the - value of the property
        Returns:
        this configuration
      • publicationFrequency

        public long publicationFrequency()
        Returns the publication frequency for the container's profile.
        Returns:
        the frquency;
      • publicationFrequency

        public ContainerConfiguration publicationFrequency​(long frequency)
        Sets the publication frequency for the container's profile.
        Parameters:
        frequency - the frequency
        Returns:
        this configuration
      • allowedContexts

        public Set<String> allowedContexts()
      • allowedContexts

        public void allowedContexts​(Set<String> allowedContexts)
      • validate

        public void validate()
        Validates this configuration
        Throws:
        IllegalStateException - if the configuration is invalid
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object