01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 2005 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or 1any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19: * USA
20: *
21: * --------------------------------------------------------------------------
22: * $Id: JonasAdminConnexion.java 7381 2005-09-14 16:00:02Z kemlerp $
23: * --------------------------------------------------------------------------
24: */package org.objectweb.jonas.jonasadmin.test.util;
25:
26: import com.meterware.httpunit.WebConversation;
27:
28: /**
29: * Class shares the connexion object
30: * Needs to use the same JVM => fork=no
31: * @author kemlerp
32: *
33: */
34: public class JonasAdminConnexion {
35:
36: /**
37: * Conversation used for HttpUnit
38: */
39: private static WebConversation wc = null;
40:
41: /**
42: * Constructor
43: *
44: */
45: private JonasAdminConnexion() {
46: super ();
47: }
48:
49: /**
50: * Get the connexion object, wc
51: * @return null or a WebConversation to JonasAdmin
52: */
53: public static WebConversation getWc() {
54: return wc;
55: }
56:
57: /**
58: * Set the connexion object, wc
59: * @param wc a WebConversation to JonasAdmin
60: */
61: public static void setWc(WebConversation wc) {
62: JonasAdminConnexion.wc = wc;
63: }
64:
65: /**
66: * Create the connexion object, wc
67: * @return JonasAdminConnexion.wc
68: */
69: public static WebConversation createWc() {
70: JonasAdminConnexion.wc = new WebConversation();
71: return JonasAdminConnexion.wc;
72: }
73:
74: }
|