KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > security > propagation > rmi > jrmp > interceptors > SecurityServiceContext


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999-2004 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * 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: SecurityServiceContext.java 1121 2006-09-27 08:51:06Z benoitf $
23  * --------------------------------------------------------------------------
24  *
25  */

26 package org.objectweb.easybeans.security.propagation.rmi.jrmp.interceptors;
27
28 import org.objectweb.carol.rmi.jrmp.interceptor.JServiceContext;
29 import org.objectweb.easybeans.security.api.EZBSecurityContext;
30
31 /**
32  * Context exchanged between client/server.
33  * @author Florent Benoit
34  */

35 public class SecurityServiceContext implements JServiceContext {
36
37     /**
38      * UID for serialization.
39      */

40     private static final long serialVersionUID = 4150443412309988096L;
41
42     /**
43      * Security context id.
44      */

45     public static final int SEC_CTX_ID = 2503;
46
47     /**
48      * Security context.
49      */

50     private EZBSecurityContext securityContext = null;
51
52     /**
53      * Constructor.
54      * @param securityContext the RMI (Serializable) Security Context
55      */

56     public SecurityServiceContext(final EZBSecurityContext securityContext) {
57         this.securityContext = securityContext;
58     }
59
60     /**
61      * Gets the security context.
62      * @return the Security context
63      */

64     public EZBSecurityContext getSecurityContext() {
65         return securityContext;
66     }
67
68     /**
69      * @return the Context id.
70      */

71     public int getContextId() {
72         return SEC_CTX_ID;
73     }
74
75 }
76
Popular Tags