01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999-2004 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 any 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: SecurityInitializer.java 4804 2004-05-25 15:13:29Z benoitf $
23: * --------------------------------------------------------------------------
24: *
25: */package org.objectweb.jonas.security.interceptors.jrmp;
26:
27: // carol import
28: import org.objectweb.carol.rmi.jrmp.interceptor.JInitializer;
29: import org.objectweb.carol.rmi.jrmp.interceptor.JInitInfo;
30:
31: /**
32: * Class <code>SecurityInitializer</code> is a JRMP Initiliazer for security
33: * context propagation
34: * @author Guillaume Riviere (Guillaume.Riviere@inrialpes.fr)
35: * @version 1.0, 13/09/2002
36: */
37: public class SecurityInitializer implements JInitializer {
38:
39: /**
40: * In JRMP the 2 method( per and post init have the same consequences ...
41: * @param JInitInfo the JInit Information
42: */
43: public void pre_init(JInitInfo info) {
44: try {
45: info
46: .add_client_request_interceptor(new ClientSecurityInterceptor());
47: info
48: .add_server_request_interceptor(new ServerSecurityInterceptor());
49: } catch (Exception 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: }
|