KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > descriptor > componentassembly > ccm > deployer > installer > HostcollocationDestinationWrapper


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2004 INRIA - USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Briclet Frédéric.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26 package org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.installer;
27
28 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.FatalDeploymentException;
29 import org.omg.Components.CCMHome;
30 import org.omg.Components.Deployment.ComponentInstallation;
31
32 /**
33  * The hostcollocationDestinationWapper wrap multiple acces on a single
34  * destination of the hostcollocation.
35  *
36  * @author <a HREF="mailto:frederic.briclet@lifl.fr">Briclet Frederic</a>
37  *
38  * @version 0.1
39  */

40 public class HostcollocationDestinationWrapper
41        extends DestinationDeployerBase
42 {
43     // ==================================================================
44
//
45
// Internal state.
46
//
47
// ==================================================================
48
private DestinationDeployerBase wrappedDestination;
49     // ==================================================================
50
//
51
// Constructor.
52
//
53
// ==================================================================
54

55     // ==================================================================
56
//
57
// Internal methods.
58
//
59
// ==================================================================
60

61     // ==================================================================
62
//
63
// Public methods.
64
//
65
// ==================================================================
66
/**
67      * @return Returns the destinationWrapped.
68      */

69     public DestinationDeployerBase getWrappedDestination() {
70         return wrappedDestination;
71     }
72     /**
73      * @param detsinationWrapped The detsinationWrapped to connect.
74      */

75     public void
76     connectWrappedDestination(DestinationDeployerBase wrappedDestination)
77     {
78         this.wrappedDestination = wrappedDestination;
79     }
80     
81     
82     /**
83      * Make the target destination deployer process all the dependencies
84      * of the implementation.
85      *
86      * @throws FatalDeploymentException if a problem occured
87      * during processing of dependencies
88      */

89     public void
90     resolveDependency()
91     throws FatalDeploymentException
92     {
93         getWrappedDestination().connectSoftpkgDeployer(getSoftpkgDeployer());
94         getWrappedDestination().connectImplementationDeployer(getImplementationDeployer());
95         getWrappedDestination().resolveDependency();
96     }
97     /**
98      * InstallHome install the home on the precised destination according
99      * to the host requirements, such as dependencies and event factory.
100      *
101      * @return The home installed
102      * @throws FatalDeploymentException
103      */

104     public CCMHome
105     installHome()
106     throws FatalDeploymentException
107     {
108         getWrappedDestination().connectSoftpkgDeployer(getSoftpkgDeployer());
109         getWrappedDestination().connectImplementationDeployer(getImplementationDeployer());
110         return getWrappedDestination().installHome();
111     }
112     /**
113      * Return the component installation of the target host used
114      * to install the home.
115      *
116      * @return The component installation of the target host
117      * @throws FatalDeploymentException if a fatal problem occured during installation
118      */

119     public ComponentInstallation
120     getComponentInstallation()
121     throws FatalDeploymentException
122     {
123         return getWrappedDestination().getComponentInstallation();
124     }
125     /**
126      * Remove a previously installed CCMHome
127      *
128      * @param home the home to remove
129      * @throws FatalDeploymentException if a fatal problem occured during uninstallation
130      */

131     public void
132     removeHome(CCMHome home)
133     throws FatalDeploymentException
134     {
135         getWrappedDestination().removeHome(home);
136     }
137
138 }
139
Popular Tags