org.objectweb.jeremie.libs.stub_factories.std
Class StdStubFactory
java.lang.Object
|
+--org.objectweb.jeremie.libs.stub_factories.std.StdStubFactory
- All Implemented Interfaces:
- DefaultStubTable, JRMIStubFactory, StubFactory
- public class StdStubFactory
- extends Object
- implements JRMIStubFactory
Provides an implementation of a Jeremie
stub factory.
The factory maintains a table associating Jeremie
stubs with the target remote objects that they represent.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StdStubFactory
public StdStubFactory(Context _c,
MarshallerFactory mfactory)
- Constructs a new Jeremie stub factory.
- Parameters:
_c - a context, used to retrieve the default class loader;mfactory - a marshaller factory.
getStubTable
public Hashtable getStubTable()
- Retrieves the stub table associated with this stub factory.
- Specified by:
getStubTable in interface JRMIStubFactory
- Returns:
- the stub table.
newStub
public RemoteStub newStub(Object impl,
Identifier id)
throws JonathanException
- Creates a stub object to represent the given (remote) object
with a reference containing the given identifier.
- Specified by:
newStub in interface JRMIStubFactory
- Parameters:
impl - the (remote) object;id - an identifier (for the remote object) that will be included
in the reference held by the stub.- Returns:
- a stub.
- Throws:
JonathanException - if something goes wrong.
newStub
public Object newStub(SessionIdentifier ep,
Identifier[] ids,
Context hints)
throws JonathanException
- Creates a stub object with a reference containing the given
identifiers and the given session identifier.
- Specified by:
newStub in interface StubFactory
- Parameters:
ep - a session identifier to be used to send marshalled data
to the object represented by the stub;ids - a set of identifiers;hints - other data possibly used to create the stub.- Returns:
- a stub.
- Throws:
JonathanException - if something goes wrong.
newRequestSession
public RequestSession newRequestSession(Object target)
throws JonathanException
- Creates a request session which can be used by the stub to send data
to the given remote object.
- Specified by:
newRequestSession in interface JRMIStubFactory
- Parameters:
target - the remote object.- Returns:
- the created request session.