KickJava   Java API By Example, From Geeks To Geeks.

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


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></p>
36  **/

37 abstract public class SegmentedSession2ContextBase
38 extends org.omg.CORBA.LocalObject JavaDoc
39 implements org.omg.Components.SegmentedSession2Context, java.io.Serializable JavaDoc
40 {
41     // context
42
private org.omg.Components.CCM2Context _context;
43     protected ReceptacleSet _receptacles;
44     protected EmitterSet _emitters;
45     protected PublisherSet _publishers;
46
47     // constructor for serialization
48
public
49     SegmentedSession2ContextBase()
50     {
51         // context
52
_context = null;
53         _receptacles = null;
54         _emitters = null;
55         _publishers = null;
56     }
57
58     // default constructor
59
protected
60     SegmentedSession2ContextBase(org.omg.Components.CCM2Context ctx,
61                                  ReceptacleSet rset,
62                                  EmitterSet eset,
63                                  PublisherSet pset)
64     {
65         // context
66
_context = ctx;
67         _receptacles = rset;
68         _emitters = eset;
69         _publishers = pset;
70     }
71
72     //
73
// IDL:omg.org/Components/CCMContext:1.0
74
//
75

76     final public org.omg.Components.CCMHome
77     get_CCM_home()
78     {
79         return _context.get_CCM_home();
80     }
81
82     //
83
// IDL:omg.org/Components/CCM2Context:1.0
84
//
85

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

134     final public org.omg.CORBA.Object JavaDoc
135     get_CCM_object()
136     throws org.omg.Components.IllegalState
137     {
138         return ((org.omg.Components.SessionContext)_context).get_CCM_object();
139     }
140
141     //
142
// IDL:omg.org/Components/Session2Context:1.0
143
//
144

145     final public org.omg.Components.ComponentId
146     get_component_id()
147     throws org.omg.Components.IllegalState
148     {
149         return ((org.omg.Components.SegmentedSession2Context)_context).get_component_id();
150     }
151
152     final public org.omg.Components.ComponentId
153     create_main_segment(org.omg.Components.SegmentDescr[] descrs)
154     {
155         return ((org.omg.Components.SegmentedSession2Context)_context).create_main_segment(descrs);
156     }
157
158     final public org.omg.CORBA.Object JavaDoc
159     create_ref_from_cid(String JavaDoc repid, org.omg.Components.ComponentId cid)
160     {
161         return ((org.omg.Components.SegmentedSession2Context)_context).create_ref_from_cid(repid, cid);
162     }
163
164     final public org.omg.Components.ComponentId
165     get_cid_from_ref(org.omg.CORBA.Object JavaDoc ref)
166     throws org.omg.Components.BadComponentReference
167     {
168         return ((org.omg.Components.SegmentedSession2Context)_context).get_cid_from_ref(ref);
169     }
170 }
171
Popular Tags