KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > deployment > util > WebServerInfo


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.enterprise.deployment.util;
25
26 import java.net.URL JavaDoc;
27 import java.net.MalformedURLException JavaDoc;
28
29 /**
30  * This class holds information about a particular web server
31  * installation, its running engines and so on...
32  *
33  * @author Jerome Dochez
34  */

35 public class WebServerInfo {
36     
37     /**
38      * Holds value of property httpVS.
39      */

40     private VirtualServerInfo httpVS;
41     
42     /**
43      * Holds value of property httpsVS.
44      */

45     private VirtualServerInfo httpsVS;
46     
47     /** Creates a new instance of WebServerInfo */
48     public WebServerInfo() {
49     }
50     
51     /**
52      * Getter for property httpVS.
53      * @return Value of property httpVS.
54      */

55     public VirtualServerInfo getHttpVS() {
56         return this.httpVS;
57     }
58     
59     /**
60      * Setter for property httpVS.
61      * @param httpVS New value of property httpVS.
62      */

63     public void setHttpVS(VirtualServerInfo httpVS) {
64         this.httpVS = httpVS;
65     }
66     
67     /**
68      * Getter for property httpsVS.
69      * @return Value of property httpsVS.
70      */

71     public VirtualServerInfo getHttpsVS() {
72         return this.httpsVS;
73     }
74     
75     /**
76      * Setter for property httpsVS.
77      * @param httpsVS New value of property httpsVS.
78      */

79     public void setHttpsVS(VirtualServerInfo httpsVS) {
80         this.httpsVS = httpsVS;
81     }
82     
83     public URL JavaDoc getWebServerRootURL(boolean secure) throws MalformedURLException JavaDoc {
84         if (secure) {
85             if (httpsVS!=null)
86                 return httpsVS.getWebServerRootURL();
87             
88         } else {
89             if (httpVS!=null)
90                 return httpVS.getWebServerRootURL();
91         }
92         return null;
93     }
94      
95 }
96
Popular Tags