FileDocCategorySizeDatePackage
DomainConfig.javaAPI DocGlassfish v2 API7588Fri May 04 22:24:30 BST 2007com.sun.enterprise.admin.servermgmt

DomainConfig

public class DomainConfig extends RepositoryConfig
This class defines the keys that are used to create the domain config object. Almost all the methods of DomainsManager require the domain config to be passed as java.util.Map, the key set of which is defined here.

Fields Summary
public static final String
K_USER
These constants define the possbile Hash Map keys that can reside in DomainConfig MAKE SURE THAT KEYS FOR PORTS END IN THE STRING "PORT" (case ignored) - this is used in PEDomainConfigValidator to ensure that the ports are unique!
public static final String
K_PASSWORD
public static final String
K_NEW_MASTER_PASSWORD
public static final String
K_MASTER_PASSWORD
public static final String
K_SAVE_MASTER_PASSWORD
public static final String
K_ADMIN_PORT
public static final String
K_INSTANCE_PORT
public static final String
K_PROFILE
public static final String
K_DOMAINS_ROOT
public static final String
K_HOST_NAME
public static final String
K_JMS_PASSWORD
public static final String
K_JMS_PORT
public static final String
K_JMS_USER
public static final String
K_ORB_LISTENER_PORT
public static final String
K_SERVERID
public static final String
K_TEMPLATE_NAME
public static final String
K_HTTP_SSL_PORT
public static final String
K_IIOP_SSL_PORT
public static final String
K_IIOP_MUTUALAUTH_PORT
public static final String
K_DEBUG
public static final String
K_VERBOSE
public static final String
K_VALIDATE_PORTS
public static final String
K_JMX_PORT
public static final String
K_EXTRA_PASSWORDS
public static final int
K_FLAG_START_DOMAIN_NEEDS_ADMIN_USER
Constructors Summary
public DomainConfig(String domainName, String domainRoot)
The DomainConfig always contains the K_DOMAINS_ROOT and K_HOST_NAME attributes.

    
    
                  
          
      
        super(domainName, domainRoot);
        try {            
            put(K_DOMAINS_ROOT, domainRoot);
            // net to get fully qualified host, not just hostname
            put(K_HOST_NAME, System.getProperty(SystemPropertyConstants.HOST_NAME_PROPERTY));
        } catch (Exception ex) {
            throw new DomainException(ex);
        }
    
public DomainConfig(String domainName, Integer adminPort, String domainRoot, String adminUser, String adminPassword, String masterPassword, Boolean saveMasterPassword, Integer instancePort, String jmsUser, String jmsPassword, Integer jmsPort, Integer orbPort, Integer httpSSLPort, Integer iiopSSLPort, Integer iiopMutualAuthPort, Integer jmxAdminPort, Properties domainProperties)
This constructor is used at domain creation time only.

        this(domainName, domainRoot);
        try {
            put(K_ADMIN_PORT, adminPort);
            put(K_JMS_USER, jmsUser);
            put(K_JMS_PASSWORD, jmsPassword);
            put(K_PASSWORD, adminPassword);
            put(K_MASTER_PASSWORD, masterPassword);
            put(K_SAVE_MASTER_PASSWORD, saveMasterPassword);
            put(K_USER, adminUser);
            put(K_INSTANCE_PORT, instancePort);
            put(K_JMS_PORT, jmsPort);
            put(K_ORB_LISTENER_PORT, orbPort);
            put(K_HTTP_SSL_PORT, httpSSLPort);
            put(K_IIOP_SSL_PORT, iiopSSLPort);
            put(K_IIOP_MUTUALAUTH_PORT, iiopMutualAuthPort);            
            put(K_JMX_PORT, jmxAdminPort);

            if(domainProperties!=null) {
                Iterator iterator = domainProperties.keySet().iterator();
                while (iterator.hasNext()) {
                    String key = (String)iterator.next();
                    String value = (String)domainProperties.get(key);
                    put(key,value);
                }
            }
        } catch (Exception ex) {
            throw new DomainException(ex);
        }
    
Methods Summary
public java.lang.StringgetDomainName()

        return super.getRepositoryName();
    
public java.lang.StringgetDomainRoot()

        return super.getRepositoryRoot();
    
public java.util.MapgetPorts()

	final Iterator it = ((Map) this).keySet().iterator();
	final Map result = new HashMap();
	while (it.hasNext()){
	  String key = (String) it.next();
	  if (key.toLowerCase().endsWith("port")){
		result.put(key, this.get(key));
	  }
	}
	return result;
  
public java.lang.StringgetProfile()

        return ( (String) get(K_PROFILE) );