KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > carol > jtests > conform > interceptor > jrmp > Initializer


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: Initializer.java,v 1.3 2005/02/08 10:03:48 benoitf Exp $
26  * --------------------------------------------------------------------------
27  */

28 package org.objectweb.carol.jtests.conform.interceptor.jrmp;
29
30 import org.objectweb.carol.rmi.jrmp.interceptor.JInitInfo;
31 import org.objectweb.carol.rmi.jrmp.interceptor.JInitializer;
32
33 /**
34  * Class <code>DummyClientServiceContext</code> is a JRMP Interface for
35  * Interceptor initialisation for carol testing
36  * @author Guillaume Riviere (Guillaume.Riviere@inrialpes.fr)
37  */

38 public class Initializer implements JInitializer {
39
40     /**
41      * In JRMP the 2 method( per and post init have the same consequences ...
42      * @param JInitInfo the JInit Information
43      */

44     public void pre_init(JInitInfo info) {
45         try {
46             info.add_client_request_interceptor(new DummyClientInterceptor("client interceptor"));
47             info.add_server_request_interceptor(new DummyServerInterceptor("server interceptor"));
48         } catch (Exception JavaDoc e) {
49             System.out.println("could'nt instantiate Interceptor" + e);
50             e.printStackTrace();
51         }
52     }
53
54     /**
55      * In JRMP the 2 method( per and post init have the same consequences ...
56      * @param JInitInfo the JInit Information
57      */

58     public void post_init(JInitInfo info) {
59         // do nothing
60
}
61
62 }
Popular Tags