KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > ccm > runtime > Session2ContextImpl


1 // ====================================================================
2
//
3
// ECM: The Extensible Container Model
4
// Copyright (C) 2004 THALES
5
// Contact: openccm-ecm@objectweb.org
6
//
7
// This library is free software; you can redistribute it and/or
8
// modify it under the terms of the GNU Lesser General Public
9
// License as published by the Free Software Foundation; either
10
// version 2.1 of the License, or any later version.
11
//
12
// This library is distributed in the hope that it will be useful,
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
// Lesser General Public License for more details.
16
//
17
// You should have received a copy of the GNU Lesser General Public
18
// License along with this library; if not, write to the Free Software
19
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20
// USA
21
//
22
// Initial developer(s): Mathieu Vadet.
23
// Initial Funding: IST COACH European project (IST-2001-34445)
24
// http://www.ist-coach.org
25
//
26
// ====================================================================
27

28
29
30 package org.objectweb.ccm.runtime;
31
32 import org.objectweb.corba.runtime.*;
33
34 /**
35  ** <p>Segment specific implementation for the <tt>Components::Session2Context</tt> interface. This
36  ** class implements the features which are specific to component instances in a particular
37  ** home instance and is therefore provided to the component instances.</p>
38  **/

39 public class Session2ContextImpl
40 extends org.omg.CORBA.LocalObject JavaDoc
41 implements org.omg.Components.Session2Context, org.coach.ECM.ECMContext
42 {
43     // session context
44
static private String JavaDoc _class_name = "SegSession2ContextImpl";
45     private HomeSession2ContextImpl _delegate;
46     private org.omg.Components.LocalEvents _events;
47     private org.omg.Components.LocalReceptacles _receptacles;
48
49     // empty constructor
50
public
51     Session2ContextImpl()
52     {
53         // session context
54
_delegate = null;
55         _events = null;
56         _receptacles = null;
57     }
58
59     // default constructor
60
protected
61     Session2ContextImpl(HomeSession2ContextImpl del, byte[] cid)
62     {
63         // session context
64
_delegate = del;
65         _events = new LocalEventsImpl(del.getLocalEvents(), cid);
66         _receptacles = new LocalReceptaclesImpl(del.getLocalReceptacles(), cid);
67     }
68
69     //
70
// IDL:omg.org/Components/CCMContext:1.0
71
//
72

73     final public org.omg.Components.CCMHome
74     get_CCM_home()
75     {
76         return _delegate.get_CCM_home();
77     }
78
79     //
80
// IDL:omg.org/Components/CCM2Context:1.0
81
//
82

83     final public org.omg.Components.HomeRegistrationLocal
84     get_home_registration()
85     {
86         return _delegate.get_home_registration();
87     }
88
89     final public void
90     req_passivate()
91     throws org.omg.Components.IllegalState,
92            org.omg.Components.PolicyMismatch
93     {
94         _delegate.req_passivate();
95     }
96
97     final public org.omg.Components.LocalEvents
98     get_events()
99     {
100         return _events;
101     }
102
103     final public org.omg.Components.LocalReceptacles
104     get_receptacles()
105     {
106         return _receptacles;
107     }
108
109     final public void
110     remove_component(org.omg.Components.CCMObject comp)
111     {
112         _delegate.remove_component(comp);
113     }
114
115     final public void
116     register_valuefactory(String JavaDoc repid, org.omg.CORBA.portable.ValueFactory JavaDoc vfact)
117     {
118         _delegate.register_valuefactory(repid, vfact);
119     }
120
121     final public org.omg.CORBA.Any JavaDoc
122     create_any()
123     {
124         return _delegate.create_any();
125     }
126
127     //
128
// IDL:omg.org/Components/SessionContext:1.0
129
//
130

131     final public org.omg.CORBA.Object JavaDoc
132     get_CCM_object()
133     throws org.omg.Components.IllegalState
134     {
135         return _delegate.get_CCM_object();
136     }
137
138     //
139
// IDL:omg.org/Components/Session2Context:1.0
140
//
141

142     final public byte[]
143     get_object_id()
144     throws org.omg.Components.IllegalState
145     {
146         return _delegate.get_object_id();
147     }
148
149     final public org.omg.CORBA.Object JavaDoc
150     create_ref(String JavaDoc repid)
151     {
152         return _delegate.create_ref(repid);
153     }
154
155     final public org.omg.CORBA.Object JavaDoc
156     create_ref_with_id(byte[] id, String JavaDoc repid)
157     {
158         return _delegate.create_ref_with_id(id, repid);
159     }
160
161     final public byte[]
162     get_id_from_ref(org.omg.CORBA.Object JavaDoc ref)
163     throws org.omg.Components.BadComponentReference
164     {
165         return _delegate.get_id_from_ref(ref);
166     }
167
168     final public org.omg.CORBA.Object JavaDoc
169     create_with_new_target(String JavaDoc repid)
170     throws org.omg.Components.IllegalState
171     {
172         return _delegate.create_with_new_target(repid);
173     }
174
175     //
176
// IDL:coach.org/ECM/ECMContext:1.0
177
//
178

179     final public org.omg.CORBA.Object JavaDoc
180     get_service_internal(String JavaDoc sid, String JavaDoc siid)
181     throws org.coach.ECM.UnknownService,
182            org.coach.ECM.UnknownServiceInternal
183     {
184         return _delegate.get_service_internal(sid, siid);
185     }
186 }
187
Popular Tags