KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > kernel > admin > ContainerInformation


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2005 EBM Websourcing, http://www.ebmwebsourcing.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id: ContainerInformation.java 16:40:52 ddesjardins $
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.kernel.admin;
23
24 import java.io.Serializable JavaDoc;
25
26 /**
27  * This class contains all the informations of a container
28  *
29  * @author ddesjardins - eBMWebsourcing
30  */

31 public class ContainerInformation implements Serializable JavaDoc {
32
33     /**
34      * Container state
35      *
36      * @author ddesjardins - eBMWebsourcing
37      */

38     public static enum ContainerState {
39         /**
40          * Started state
41          */

42         STARTED,
43         /**
44          * Stopped state
45          */

46         STOPPED
47     };
48
49     /**
50      *
51      */

52     private static final long serialVersionUID = 1L;
53
54     /**
55      * Host of the petals container
56      */

57     private String JavaDoc host;
58
59     /**
60      * Port of the html adaptor
61      */

62     private String JavaDoc htmlPort;
63
64     /**
65      * Login to connect to the JMX server
66      */

67     private String JavaDoc jmxLogin;
68
69     /**
70      * Password to connect to the JMX server
71      */

72     private String JavaDoc jmxPassword;
73
74     /**
75      * Port of the JMX server
76      */

77     private String JavaDoc jmxPort;
78
79     /**
80      * JNDI Factory
81      */

82     private String JavaDoc jndiFactory;
83
84     /**
85      * JNDI port
86      */

87     private String JavaDoc jndiPort;
88
89     /**
90      * Name of the Joram domain
91      */

92     private String JavaDoc joramDomain;
93
94     /**
95      * Port of the Joram domain
96      */

97     private String JavaDoc joramDomainPort;
98
99     /**
100      * Id of the Joram server
101      */

102     private String JavaDoc joramId;
103
104     /**
105      * Login to connect to the Joram server
106      */

107     private String JavaDoc joramLogin;
108
109     /**
110      * Password to connect to the Joram server
111      */

112     private String JavaDoc joramPassword;
113
114     /**
115      * Port of the Joram TCP topic
116      */

117     private String JavaDoc joramTCPPort;
118
119     /**
120      * State of the container
121      */

122     private ContainerState state = ContainerState.STOPPED;
123
124     /**
125      * Container name
126      */

127     private String JavaDoc name;
128
129     /**
130      * Container uid
131      */

132     private long uid;
133
134     public long getUid() {
135         return uid;
136     }
137
138     public void setUid(long uid) {
139         this.uid = uid;
140     }
141
142     public String JavaDoc getHost() {
143         return host;
144     }
145
146     public String JavaDoc getHtmlPort() {
147         return htmlPort;
148     }
149
150     public String JavaDoc getJmxLogin() {
151         return jmxLogin;
152     }
153
154     public String JavaDoc getJmxPassword() {
155         return jmxPassword;
156     }
157
158     public String JavaDoc getJmxPort() {
159         return jmxPort;
160     }
161
162     public String JavaDoc getJndiFactory() {
163         return jndiFactory;
164     }
165
166     public String JavaDoc getJndiPort() {
167         return jndiPort;
168     }
169
170     public String JavaDoc getJoramDomain() {
171         return joramDomain;
172     }
173
174     public String JavaDoc getJoramDomainPort() {
175         return joramDomainPort;
176     }
177
178     public String JavaDoc getJoramId() {
179         return joramId;
180     }
181
182     public String JavaDoc getJoramLogin() {
183         return joramLogin;
184     }
185
186     public String JavaDoc getJoramPassword() {
187         return joramPassword;
188     }
189
190     public String JavaDoc getJoramTCPPort() {
191         return joramTCPPort;
192     }
193
194     public String JavaDoc getName() {
195         return name;
196     }
197
198     public void setHost(String JavaDoc host) {
199         this.host = host;
200     }
201
202     public void setHtmlPort(String JavaDoc htmlPort) {
203         this.htmlPort = htmlPort;
204     }
205
206     public void setJmxLogin(String JavaDoc jmxLogin) {
207         this.jmxLogin = jmxLogin;
208     }
209
210     public void setJmxPassword(String JavaDoc jmxPassword) {
211         this.jmxPassword = jmxPassword;
212     }
213
214     public void setJmxPort(String JavaDoc jmxPort) {
215         this.jmxPort = jmxPort;
216     }
217
218     public void setJndiFactory(String JavaDoc jndiFactory) {
219         this.jndiFactory = jndiFactory;
220     }
221
222     public void setJndiPort(String JavaDoc jndiPort) {
223         this.jndiPort = jndiPort;
224     }
225
226     public void setJoramDomain(String JavaDoc joramDomain) {
227         this.joramDomain = joramDomain;
228     }
229
230     public void setJoramDomainPort(String JavaDoc joramPort) {
231         this.joramDomainPort = joramPort;
232     }
233
234     public void setJoramId(String JavaDoc joramId) {
235         this.joramId = joramId;
236     }
237
238     public void setJoramLogin(String JavaDoc joramLogin) {
239         this.joramLogin = joramLogin;
240     }
241
242     public void setJoramPassword(String JavaDoc joramPassword) {
243         this.joramPassword = joramPassword;
244     }
245
246     public void setJoramTCPPort(String JavaDoc joramTCPPort) {
247         this.joramTCPPort = joramTCPPort;
248     }
249
250     public void setName(String JavaDoc name) {
251         this.name = name;
252     }
253
254     public ContainerState getState() {
255         return state;
256     }
257
258     public void setState(ContainerState state) {
259         this.state = state;
260     }
261
262     public boolean isStarted() {
263         return state.equals(ContainerState.STARTED);
264     }
265
266     public boolean isStopped() {
267         return state.equals(ContainerState.STOPPED);
268     }
269
270     public String JavaDoc toString() {
271         return "Container " + joramId + " (isRunning " + isStarted()
272             + ") host: " + host + " Joram: " + joramDomainPort + " JMX: "
273             + jmxPort + " JNDI: " + jndiPort + " HTML: " + htmlPort;
274     }
275 }
276
Popular Tags