org.gcube.smartgears.configuration.container
Class ContainerConfiguration

java.lang.Object
  extended by org.gcube.smartgears.configuration.container.ContainerConfiguration

public class ContainerConfiguration
extends Object

The configuration of the container.

Author:
Fabio Simeoni

Constructor Summary
ContainerConfiguration()
           
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
 String hostname()
          Returns the host name of the container.
 ContainerConfiguration hostname(String name)
          Sets the host name of the container.
 String infrastructure()
          Returns the infrastructure in which the container is running.
 ContainerConfiguration infrastructure(String infrastructure)
          Sets the infrastructure in which the container is running.
 Mode mode()
          Returns the management mode for the container.
 ContainerConfiguration mode(Mode mode)
          Sets the management mode for the container.
 Persistence persistence()
          Returns the persistence manager of the container.
 ContainerConfiguration persistence(Persistence manager)
          Sets the persistence manager of the container.
 int port()
          Returns the port at which the container is listening for requests.
 ContainerConfiguration port(int port)
          Sets the port at which the container is listening for requests.
 Map<String,String> properties()
          Returns the configuration properties of the container.
 ContainerConfiguration property(String name, String value)
          Adds a configuration property to the container.
 long publicationFrequency()
          Returns the publication frequency for the container's profile.
 ContainerConfiguration publicationFrequency(long frequency)
          Sets the publication frequency for the container's profile.
 Site site()
          Returns the geographical site of the container.
 ContainerConfiguration site(Site site)
          Sets the geographical site of the container.
 List<String> startScopes()
          Returns the scopes in which the container initially operates.
 List<String> startVOs()
          Returns the VOs in which the container initially operates.
 ContainerConfiguration startVOs(String... vos)
          Sets the VOs in which the container initially operates.
 void validate()
          Validates this configuration
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

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

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

port

public ContainerConfiguration port(int port)
Sets the port at which the container is listening for requests.

Parameters:
port - the port
Returns:
this configuration

startVOs

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

Returns:
the VOs

startVOs

public ContainerConfiguration startVOs(String... vos)
Sets the VOs in which the container initially operates.

Parameters:
vos - the VOs
Returns:
this configuration

startScopes

public List<String> startScopes()
Returns the scopes in which the container initially operates.

Returns:
the start scopes

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

validate

public void validate()
Validates this configuration

Throws:
IllegalStateException - if the configuration is invalid

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2013. All Rights Reserved.