

Definition at line 70 of file david/libs/binding/orbs/echannel/EventChannelFactory.java.
|
|
Constructs a new instance of EventChannelFactory. This method should not be called directly by an application: It is here only to let EventChannelFactory be instanciated when one of the org.omg.CORBA.ORB.init(...) methods is called. Definition at line 82 of file david/libs/binding/orbs/echannel/EventChannelFactory.java. 00082 {
00083 super("/david/orbs/echannel");
00084 }
|
|
|
Definition at line 86 of file david/libs/binding/orbs/echannel/EventChannelFactory.java. 00087 {
00088 super();
00089 initialize(_c,_used_components);
00090 }
|
|
|
Definition at line 79 of file jeremie/libs/binding/echannel/EventChannelFactory.java. 00080 {
00081 super();
00082 initialize(c,used_components);
00083 }
|
|
|
Binds a consumer object to the event channel represented by the given identifier.
Definition at line 175 of file jeremie/libs/binding/echannel/EventChannelFactory.java. 00176 {
00177 channel_factory.bindConsumer(new OneWaySkeleton(consumer),id);
00178 }
|
|
|
Definition at line 236 of file david/libs/binding/orbs/echannel/EventChannelFactory.java. 00237 {
00238 String stub_type = channel_proxy.getClass().getName();
00239 String skeleton_type =
00240 stub_type.substring(0,stub_type.length() - 4) + "ImplBase";
00241 Skeleton skeleton =
00242 ((EStubFactory) stub_factory).newSkeleton(skeleton_type,consumer);
00243
00244 getEBinder().bindConsumer(new ConsumerDelegate(skeleton),id);
00245 }
|
|
|
Binds a consumer object to the event channel represented by the
Definition at line 176 of file david/libs/binding/orbs/echannel/EventChannelFactory.java. 00177 {
00178 EBinder.EId id = getId(channel_proxy);
00179 if (id != null) {
00180 EventChannelFactory binder = (EventChannelFactory) id.getContext();
00181 binder.bindConsumer(id,consumer,channel_proxy);
00182 } else {
00183 throw new BindException("Unbound channel");
00184 }
00185 }
|
|
|
Decodes an identifier from the provided unmarshaller.
Reimplemented from NamingContext. Definition at line 208 of file jeremie/libs/binding/echannel/EventChannelFactory.java. 00209 {
00210 return channel_factory.decode(u);
00211 }
|
|
|
Decode an indentifier representing an event channel out of the supplied array of bytes.
Reimplemented from NamingContext. Definition at line 196 of file jeremie/libs/binding/echannel/EventChannelFactory.java. 00197 {
00198 return channel_factory.decode(data,offset,length);
00199 }
|
|
|
Returns an identifier, decoded using an UnMarshaller;
Reimplemented from NamingContext. Definition at line 206 of file david/libs/binding/orbs/echannel/EventChannelFactory.java. 00207 {
00208 return ebinder.decode(u);
00209 }
|
|
|
Returns an identifier, decoded from a byte array portion.
Reimplemented from NamingContext. Definition at line 195 of file david/libs/binding/orbs/echannel/EventChannelFactory.java. 00196 {
00197 return ebinder.decode(data,offset,length);
00198 }
|
|
|
This operation has no meaning in this context: an InternalException is always thrown.
Reimplemented from NamingContext. Definition at line 105 of file jeremie/libs/binding/echannel/EventChannelFactory.java. 00105 {
00106 throw new InternalException("Meaningless operation.");
00107 }
|
|
|
This operation has no meaning in this context: an InternalException is always thrown.
Reimplemented from NamingContext. Definition at line 127 of file david/libs/binding/orbs/echannel/EventChannelFactory.java. 00127 {
00128 throw new InternalException("Meaningless operation.");
00129 }
|
|
|
Definition at line 213 of file jeremie/libs/binding/echannel/EventChannelFactory.java. 00213 {
00214 return channel_factory;
00215 }
|
|
|
Definition at line 212 of file david/libs/binding/orbs/echannel/EventChannelFactory.java. 00212 {
00213 return ebinder;
00214 }
|
|
|
Definition at line 216 of file david/libs/binding/orbs/echannel/EventChannelFactory.java. 00216 {
00217 EBinder.EId id;
00218 if (proxy instanceof ObjectImpl) {
00219 Identifier[] ids =
00220 ((Reference) ((ObjectImpl) proxy)._get_delegate()).getIdentifiers();
00221 Object cid;
00222 for (int i = 0; i < ids.length; i++) {
00223 cid = ids[i];
00224 while (cid instanceof Identifier) {
00225 if (cid instanceof EBinder.EId) {
00226 return (EBinder.EId) cid;
00227 } else {
00228 cid = ((Identifier) cid).resolve();
00229 }
00230 }
00231 }
00232 }
00233 return null;
00234 }
|
|
|
Initializes the EventChannelfactory.
Definition at line 90 of file jeremie/libs/binding/echannel/EventChannelFactory.java. 00091 {
00092 ChunkFactory chunk_factory = (ChunkFactory) used_components[0];
00093 marshaller_factory = (MarshallerFactory) used_components[1];
00094 channel_factory = new EBinder(chunk_factory,marshaller_factory,this,this);
00095 }
|
|
|
Initializes the EventChannelfactory.
Definition at line 103 of file david/libs/binding/orbs/echannel/EventChannelFactory.java. 00103 {
00104 // ORBClass method
00105 initialize(_c);
00106 // local
00107 ChunkFactory chunk_factory = (ChunkFactory) used_components[0];
00108 domain = (NamingContext) used_components[1];
00109 marshaller_factory =
00110 new PortableMarshallerFactory(chunk_factory,
00111 (ContextFactory) used_components[3],
00112 this,this);
00113 orb_context.addElement("DavidStreamFactory",DavidStreamFactory.class,
00114 marshaller_factory,(char) 0);
00115 stub_factory = new EStubFactory(this,(ClassPathFinder) used_components[2]);
00116 ebinder = new EBinder(chunk_factory,marshaller_factory,this,stub_factory);
00117 }
|
|
|
Initializes the EventChannelFactory.
Reimplemented from ORBClass. Definition at line 96 of file david/libs/binding/orbs/echannel/EventChannelFactory.java. 00096 {
00097 Object[] used_components =
00098 EventChannelFactoryFactory.factory.getUsedComponents(orb_context);
00099 EventChannelFactoryFactory.factory.register(this,orb_context);
00100 initialize(orb_context,used_components);
00101 }
|
|
|
Constructs and returns a new EventChannel
Definition at line 162 of file jeremie/libs/binding/echannel/EventChannelFactory.java. 00163 {
00164 return new EventChannelImpl(address, port, type, this);
00165 }
|
|
|
Constructs and returns a new EventChannel.
Definition at line 143 of file david/libs/binding/orbs/echannel/EventChannelFactory.java. Referenced by NewsSource::main(). 00145 {
00146 int index = type.lastIndexOf('.');
00147 String stub_type;
00148 if (index < 0) {
00149 stub_type = "_" + type + "Stub";
00150 } else {
00151 index++;
00152 stub_type = type.substring(0,index) + "_" + type.substring(index) + "Stub";
00153 }
00154 EStubFactory sf = (EStubFactory) stub_factory;
00155 ObjectImpl channel = sf.newStub(stub_type);
00156 String[] rep_ids = channel._ids();
00157 int nb = rep_ids.length;
00158 String types = rep_ids[0];
00159 for (int i = 1; i < nb; i++) {
00160 types = types + ";" + rep_ids[i];
00161 }
00162 EBinder.EId id = ebinder.newId(address,port,types);
00163 Delegate delegate = sf.newDelegate(id,id.getSessionIdentifier(),types);
00164 channel._set_delegate(delegate);
00165 return channel;
00166 }
|
|
|
Builds a new stub adapted for one-way event generation
Definition at line 117 of file jeremie/libs/binding/echannel/EventChannelFactory.java. 00118 {
00119 try {
00120 RemoteStub stub = null;
00121 RemoteRef ref = null;
00122 Class stub_class = null;
00123 ref = new OneWayRefImpl(ep,ids,marshaller_factory);
00124
00125 Object component = null;
00126 if ((component = hints.getValue("remote_stub",(char) 0))
00127 instanceof RemoteStub) {
00128 stub = (RemoteStub) component;
00129 } else if ((component = hints.getValue("interface_type",(char) 0))
00130 instanceof String) {
00131 stub_class = Class.forName((String) component + "_Stub");
00132 } else {
00133 throw new InternalException("Stub class specification required.");
00134 }
00135
00136 if (stub instanceof StdStub) {
00137 ((StdStub) stub).setRef(ref);
00138 } else {
00139 if (stub != null) {
00140 stub_class = stub.getClass();
00141 }
00142 Constructor cnstr =
00143 stub_class.getConstructor(new Class[] {RemoteRef.class});
00144 stub = (RemoteStub) cnstr.newInstance(new Object[] {ref});
00145 }
00146 return stub;
00147 } catch (ClassCastException e) {
00148 throw new InternalException("invalid call to newStub");
00149 } catch (Exception e) {
00150 throw new JonathanException(e);
00151 }
00152 }
|
|
|
Definition at line 76 of file jeremie/libs/binding/echannel/EventChannelFactory.java. |
|
|
Definition at line 73 of file david/libs/binding/orbs/echannel/EventChannelFactory.java. |
|
|
Reimplemented from ORBClass. Definition at line 77 of file jeremie/libs/binding/echannel/EventChannelFactory.java. |
1.2.6 written by Dimitri van Heesch,
© 1997-2001