KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > coach > reactor > IR3toReactorImpl


1 /***************************************************************************/
2 /* COACH: Component Based Open Source Architecture for */
3 /* Distributed Telecom Applications */
4 /* See: http://www.objectweb.org/ */
5 /* */
6 /* Copyright (C) 2003 Lucent Technologies Nederland BV */
7 /* Bell Labs Advanced Technologies - EMEA */
8 /* */
9 /* Initial developer(s): Willem A. Romijn (based the work of Mathieu Vadet */
10 /* and Phillipe Merle */
11 /* This library is free software; you can redistribute it and/or */
12 /* modify it under the terms of the GNU Lesser General Public */
13 /* License as published by the Free Software Foundation; either */
14 /* version 2.1 of the License, or (at your option) any later version. */
15 /* */
16 /* This library is distributed in the hope that it will be useful, */
17 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
18 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */
19 /* Lesser General Public License for more details. */
20 /* */
21 /* You should have received a copy of the GNU Lesser General Public */
22 /* License along with this library; if not, write to the Free Software */
23 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
24 /***************************************************************************/
25
26 package org.coach.reactor;
27
28 /**
29  * This class is launched by the ir3_rimpl script.
30  *
31  * @author <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>
32  * <a HREF="mailto:Mathieu.Vadet@lifl.fr">Mathieu Vadet</a>
33  *
34  * @version 0.3
35  */

36
37 public class IR3toReactorImpl
38        extends org.objectweb.openccm.corba.Application
39 {
40     // ==================================================================
41
//
42
// Internal state.
43
//
44
// ==================================================================
45

46     // ==================================================================
47
//
48
// Constructor.
49
//
50
// ==================================================================
51

52     /**
53      ** The default constructor.
54      **/

55     public
56     IR3toReactorImpl()
57     {
58     }
59
60     // ==================================================================
61
//
62
// Internal methods.
63
//
64
// ==================================================================
65

66     // ==================================================================
67
//
68
// Public methods.
69
//
70
// ==================================================================
71

72     /**
73      ** The main bootstrap method.
74      **/

75     public static void
76     main(String JavaDoc[] args)
77     {
78         IR3toReactorImpl ir3 = new IR3toReactorImpl();
79         ir3.start(args);
80     }
81
82     // ==================================================================
83
//
84
// Methods for the org.objectweb.openccm.corba.Application class.
85
//
86
// ==================================================================
87

88     /**
89      ** Run the application.
90      **
91      ** @param args The command line arguments.
92      **
93      ** @return The status.
94      **/

95     public int
96     run(String JavaDoc[] args)
97     {
98         // Obtain the Interface Repository.
99
org.omg.CORBA.ComponentIR.Repository repositoryRef =
100             org.objectweb.openccm.corba.TheInterfaceRepository.getRepository();
101
102         // Start an IDL3 Repository
103
org.objectweb.ccm.IDL3.Repository rep =
104             new org.objectweb.ccm.IDL3.Repository(repositoryRef);
105
106         try
107         {
108             IDL3_ReactorImpl mi = new IDL3_ReactorImpl(rep);
109
110             mi.generate(args[0]);
111         }
112         catch(fr.lifl.cim.jidlscript.lang.JISError ex)
113         {
114             System.err.println(ex.exception.toString());
115             return 1;
116         }
117
118     return 0;
119     }
120 }
121
Popular Tags