KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > carol > jtests > conform > interceptor > iiop > IIOPInitializer


1 /**
2  * Copyright (C) 2002,2005 - INRIA (www.inria.fr)
3  *
4  * CAROL: Common Architecture for RMI ObjectWeb Layer
5  *
6  * This library is developed inside the ObjectWeb Consortium,
7  * http://www.objectweb.org
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22  * USA
23  *
24  * --------------------------------------------------------------------------
25  * $Id: IIOPInitializer.java,v 1.4 2005/02/14 09:41:56 benoitf Exp $
26  * --------------------------------------------------------------------------
27  */

28 package org.objectweb.carol.jtests.conform.interceptor.iiop;
29
30 import org.omg.CORBA.LocalObject JavaDoc;
31 import org.omg.PortableInterceptor.ORBInitInfo JavaDoc;
32 import org.omg.PortableInterceptor.ORBInitializer JavaDoc;
33
34 /**
35  * Class <code>IIOPInitializer</code> is a IIOP Interceptor initialisation for
36  * carol testing
37  * @author Guillaume Riviere (Guillaume.Riviere@inrialpes.fr)
38  */

39 public class IIOPInitializer extends LocalObject JavaDoc implements ORBInitializer JavaDoc {
40
41     /**
42      * Init interceptors
43      * @param info ORB info
44      */

45     public void pre_init(ORBInitInfo JavaDoc info) {
46         try {
47             info.add_client_request_interceptor(new IIOPDummyClientInterceptor("client interceptor"));
48             info.add_server_request_interceptor(new IIOPDummyServerInterceptor("server interceptor"));
49         } catch (Exception JavaDoc e) {
50             System.out.println("could'nt instantiate iiop Interceptor" + e);
51             e.printStackTrace();
52         }
53     }
54
55     /**
56      * Called during ORB initialization. If a service must resolve initial
57      * references as part of its initialization, it can assume that all initial
58      * references will be available at this point.
59      * @param info provides initialization attributes and operations by which
60      * Interceptors can be registered.
61      */

62     public void post_init(ORBInitInfo JavaDoc info) {
63         // do nothing
64
}
65
66 }
Popular Tags