|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.david.libs.stub_factories.std.JStubFactory
Stub factories are factories for client and server stubs. This interface is used by binders to require the construction of stubs.
Nested Class Summary | |
class |
JStubFactory.ClientDelegate
Type of the client-side delegates. |
Field Summary | |
protected static java.util.Hashtable |
smart_output_table
Hashtable containing the smart stubs. |
Fields inherited from interface org.objectweb.david.libs.stub_factories.std.Constants |
_bad_operation, _corba_object_id, _corba_prefix, _just_corba_object |
Constructor Summary | |
JStubFactory(org.omg.CORBA.ORB orb,
org.objectweb.jonathan.apis.kernel.ClassPathFinder class_finder)
Constructs a new stub factory. |
Method Summary | |
protected java.lang.Class |
createClass(java.lang.String str)
Loads the class of name str using the class loader of the target stub factory |
protected org.omg.CORBA.portable.ObjectImpl |
newSmartStub(java.lang.String s_type,
org.omg.CORBA.portable.Delegate delegate)
Returns a stub of type s_type, initialized with the provided delegate. |
java.lang.Object |
newStub(SessionIdentifier session_id,
Identifier[] ids,
org.objectweb.jonathan.apis.kernel.Context hints)
Creates a new stub. |
static org.omg.CORBA.portable.ObjectImpl |
newStub(java.lang.String s_type,
org.omg.CORBA.portable.Delegate delegate)
Returns a new stub of type s_type initialized with the
provided delegate. |
static void |
registerSmartStub(java.lang.String std_stub_type,
java.lang.Class smart_stub_class)
Registers a class for smart output stubs as a replacement of a standard stub type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static java.util.Hashtable smart_output_table
Constructor Detail |
public JStubFactory(org.omg.CORBA.ORB orb, org.objectweb.jonathan.apis.kernel.ClassPathFinder class_finder)
orb
- the ORB asking for the construction of the stub factory;class_finder
- the class loader used to initialize orb
.Method Detail |
public java.lang.Object newStub(SessionIdentifier session_id, Identifier[] ids, org.objectweb.jonathan.apis.kernel.Context hints) throws org.objectweb.jonathan.apis.kernel.JonathanException
newStub
in interface StubFactory
session_id
- a protocol session identifier, to be used to send
marshalled data to the object represented by the stub;ids
- the set of identifiers of the stub;hints
- hints
org.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.public static org.omg.CORBA.portable.ObjectImpl newStub(java.lang.String s_type, org.omg.CORBA.portable.Delegate delegate) throws org.objectweb.jonathan.apis.kernel.JonathanException
s_type
initialized with the
provided delegate.
The provided delegate must be of type ClientDelegate
otherwise this method returns null.
s_type
- the expected stub type;delegate
- a CORBA delegate.
org.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.public static void registerSmartStub(java.lang.String std_stub_type, java.lang.Class smart_stub_class)
If smart_stub_class
is null, the previous class registered for
std_stub_type
is un-registered. std_stub_type
must
not be null.
protected java.lang.Class createClass(java.lang.String str) throws java.lang.ClassNotFoundException
str
- the name of a class to load;
java.lang.ClassNotFoundException
- if the class can't be found.protected org.omg.CORBA.portable.ObjectImpl newSmartStub(java.lang.String s_type, org.omg.CORBA.portable.Delegate delegate) throws org.objectweb.jonathan.apis.kernel.JonathanException
If a smart stub type has been registered for s_type, it is used. Otherwise, the regular stub type is used.
s_type
- the stub type;delegate
- the delegate for the created stub (may be null).
org.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |