org.ow2.jasmine.deployme
Class DeployMe

java.lang.Object
  extended by org.ow2.jasmine.deployme.DeployMe

public class DeployMe
extends java.lang.Object

The main class of deployMe project.

Author:
Remy Bresson

Field Summary
protected  java.util.List<ServerDomain> serversDomains
          List of the servers witch deployMe will work
protected  org.ow2.jasmine.deployme.generated.Topology topology
          The loaded from xml topology
 
Constructor Summary
protected DeployMe()
          Default constructor, do nothing
Only for test
  DeployMe(java.net.URL topologyUrl, java.lang.String hostname, java.lang.String domain, java.lang.String server, java.lang.String cluster)
          JASMINe-CJC constructor :
- Load the topology
- Apply the config of the servers(hostname or domain/server/cluster)
 
Method Summary
protected  java.util.List<ServerDomain> buildServerDomainList(java.lang.String hostname, java.lang.String domain, java.lang.String server, java.lang.String clusterName)
          Build the server list that will be used.
protected  org.ow2.jasmine.deployme.generated.Topology.Domains.Domain.ClusterDaemons.ClusterDaemon getClusterDaemonConf(java.lang.String domain, java.lang.String clusterName)
           
protected  void loadTopology(java.net.URL urlTopology, java.net.URL schemaUrl)
          Load the topology from the url urlTopology using the schema from schemaUrl.
protected  org.ow2.jasmine.deployme.generated.Topology.Domains.Domain.ClusterDaemons.ClusterDaemon mergeClusterDaemonAndDomainConf(org.ow2.jasmine.deployme.generated.Topology.Domains.Domain.ClusterDaemons.ClusterDaemon cd, org.ow2.jasmine.deployme.generated.Topology.Domains.Domain domain)
          Merge the configuration of the domain with the configuration of the cluster daemon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

topology

protected org.ow2.jasmine.deployme.generated.Topology topology
The loaded from xml topology


serversDomains

protected java.util.List<ServerDomain> serversDomains
List of the servers witch deployMe will work

Constructor Detail

DeployMe

protected DeployMe()
Default constructor, do nothing
Only for test


DeployMe

public DeployMe(java.net.URL topologyUrl,
                java.lang.String hostname,
                java.lang.String domain,
                java.lang.String server,
                java.lang.String cluster)
         throws org.xml.sax.SAXException,
                javax.xml.bind.JAXBException
JASMINe-CJC constructor :
- Load the topology
- Apply the config of the servers(hostname or domain/server/cluster)

Parameters:
topologyUrl - topology xml file to use url
hostname - The hostname (machine) to use. if set domain or server or cluster name must not be set
domain - The domain where found the server to use. If set, server or cluster has to be set, and hostname must no be sett
server - The server to use. If set, domain has to be sett and cluster or hostname must not be set
cluster - The cluster daemon to use. If set, domain has to be sett and server or hostname must not be set
Throws:
javax.xml.bind.JAXBException - JAXB exception.
org.xml.sax.SAXException - SAX exception.
Method Detail

loadTopology

protected void loadTopology(java.net.URL urlTopology,
                            java.net.URL schemaUrl)
                     throws org.xml.sax.SAXException,
                            javax.xml.bind.JAXBException
Load the topology from the url urlTopology using the schema from schemaUrl. Store the topology on DeployMe.topology variable.

Parameters:
urlTopology - Url of the topology on xml format
schemaUrl - Url of the schema to use (xsd)
Throws:
javax.xml.bind.JAXBException - JAXB exception.
org.xml.sax.SAXException - SAX exception.

getClusterDaemonConf

protected org.ow2.jasmine.deployme.generated.Topology.Domains.Domain.ClusterDaemons.ClusterDaemon getClusterDaemonConf(java.lang.String domain,
                                                                                                                       java.lang.String clusterName)

buildServerDomainList

protected java.util.List<ServerDomain> buildServerDomainList(java.lang.String hostname,
                                                             java.lang.String domain,
                                                             java.lang.String server,
                                                             java.lang.String clusterName)
Build the server list that will be used.

Parameters:
hostname - host name
domain - domain name
server - server name
clusterName - cluster daemon name
Returns:
A list with the server to configure

mergeClusterDaemonAndDomainConf

protected org.ow2.jasmine.deployme.generated.Topology.Domains.Domain.ClusterDaemons.ClusterDaemon mergeClusterDaemonAndDomainConf(org.ow2.jasmine.deployme.generated.Topology.Domains.Domain.ClusterDaemons.ClusterDaemon cd,
                                                                                                                                  org.ow2.jasmine.deployme.generated.Topology.Domains.Domain domain)
Merge the configuration of the domain with the configuration of the cluster daemon

Parameters:
cd - cluster daemon configuration
domain - the domain
Returns:
the merged configuration


Copyright © 2008 OW2 Consortium. All Rights Reserved.