KickJava   Java API By Example, From Geeks To Geeks.

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


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 SegmentedSession2ContextImpl
40 extends org.omg.CORBA.LocalObject JavaDoc
41 implements org.omg.Components.SegmentedSession2Context, org.coach.ECM.ECMContext
42 {
43     // segmented session context
44
static private String JavaDoc _class_name = "SegSegmentedSession2ContextImpl";
45     private HomeSegmentedSession2ContextImpl _delegate;
46     private org.omg.Components.LocalEvents _events;
47     private org.omg.Components.LocalReceptacles _receptacles;
48
49     // empty constructor
50
protected
51     SegmentedSession2ContextImpl()
52     {
53         // segmented session context
54
_delegate = null;
55         _events = null;
56         _receptacles = null;
57     }
58
59     // default constructor
60
protected
61     SegmentedSession2ContextImpl(HomeSegmentedSession2ContextImpl del, byte[] mainsegid)
62     {
63         // segmented session context
64
_delegate = del;
65         _events = new LocalEventsImpl(del.getLocalEvents(), mainsegid);
66         _receptacles = new LocalReceptaclesImpl(del.getLocalReceptacles(), mainsegid);
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/SegmentedSession2Context:1.0
140
//
141

142     final public org.omg.Components.ComponentId
143     get_component_id()
144     throws org.omg.Components.IllegalState
145     {
146         return _delegate.get_component_id();
147     }
148
149     final public org.omg.Components.ComponentId
150     create_main_segment(org.omg.Components.SegmentDescr[] descrs)
151     {
152         return _delegate.create_main_segment(descrs);
153     }
154
155     final public org.omg.CORBA.Object JavaDoc
156     create_ref_from_cid(String JavaDoc repid,
157                         org.omg.Components.ComponentId cid)
158     {
159         return _delegate.create_ref_from_cid(repid, cid);
160     }
161
162     final public org.omg.Components.ComponentId
163     get_cid_from_ref(org.omg.CORBA.Object JavaDoc ref)
164     throws org.omg.Components.BadComponentReference
165     {
166         return _delegate.get_cid_from_ref(ref);
167     }
168
169     //
170
// IDL:coach.org/ECM/ECMContext:1.0
171
//
172

173     final public org.omg.CORBA.Object JavaDoc
174     get_service_internal(String JavaDoc sid, String JavaDoc siid)
175     throws org.coach.ECM.UnknownService,
176            org.coach.ECM.UnknownServiceInternal
177     {
178         return _delegate.get_service_internal(sid, siid);
179     }
180 }
181
Popular Tags