|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.objectweb.fractal.rmi.stub.MyRmiStubFactory
public class MyRmiStubFactory
A stub and skeleton factory based on ASM. This factory generates the stub
and skeleton classes dynamically, when they are needed. It is therefore not
necessary for the user to statically generate these classes with a tool such
as rmic or idlc.
The stubs and skeletons created by this factory marshall and unmarshall the
method invocations by using the following format: a method invocation message
contains a four bytes method index, which uniquely and unambiguously
identifies a method among the methods provided by a Java interface, followed
by the method's arguments, marshalled in the order of their declaration in
the method's signature.
In order to be able to manually generate stubs and skeletons before execution and avoid their generation at runtime (typically for performance reasons, although no real testing has been performed), this class can be used as a kind of a stub compiler through its main method, giving as arguments the Java interfaces you want to compile stubs for. Note that this generation is performed at byte code level only, i.e. it takes compiled interfaces as input and generates compiled stubs and skeletons classes. In other words, the interfaces (fully-qualified) names you specify must be compiled and reachable in the classpath, and the result is a corresponding set of stub and skeleton compiled classes (taking current directory as base directory).
| Field Summary | |
|---|---|
protected org.objectweb.util.monolog.api.Logger |
logger
The logger used to log messages. |
protected org.objectweb.util.monolog.api.LoggerFactory |
loggerFactory
The optional logger factory used to get a logger for this component. |
protected MarshallerFactory |
marshallerFactory
The marshaller factory to be used by the stubs created by this factory. |
| Constructor Summary | |
|---|---|
MyRmiStubFactory()
Constructs a new MyRmiStubFactory. |
|
| Method Summary | |
|---|---|
void |
bindFc(java.lang.String clientItfName,
java.lang.Object serverItf)
|
java.lang.String[] |
listFc()
|
java.lang.Object |
lookupFc(java.lang.String clientItfName)
|
RequestSession |
newSkeleton(java.lang.Object target)
Creates a new skeleton implementing the RequestSession interface. |
java.lang.Object |
newStub(SessionIdentifier sessionId,
Identifier[] ids,
Context hints)
Creates a new stub. |
void |
unbindFc(java.lang.String clientItfName)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected MarshallerFactory marshallerFactory
protected org.objectweb.util.monolog.api.LoggerFactory loggerFactory
protected org.objectweb.util.monolog.api.Logger logger
| Constructor Detail |
|---|
public MyRmiStubFactory()
MyRmiStubFactory.
| Method Detail |
|---|
public java.lang.String[] listFc()
listFc in interface org.objectweb.fractal.api.control.BindingControllerpublic java.lang.Object lookupFc(java.lang.String clientItfName)
lookupFc in interface org.objectweb.fractal.api.control.BindingController
public void bindFc(java.lang.String clientItfName,
java.lang.Object serverItf)
bindFc in interface org.objectweb.fractal.api.control.BindingControllerpublic void unbindFc(java.lang.String clientItfName)
unbindFc in interface org.objectweb.fractal.api.control.BindingController
public java.lang.Object newStub(SessionIdentifier sessionId,
Identifier[] ids,
Context hints)
throws JonathanException
newStub in interface StubFactorysessionId - a 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 - other data possibly used to create the stub. This method
requires the fully qualified name of the Java interface to
which the stub will gives access. This name must be associated
to the "interface_type" key.
Stub class.
JonathanException - if something goes wrong.
public RequestSession newSkeleton(java.lang.Object target)
throws JonathanException
SkeletonFactoryRequestSession interface.
newSkeleton in interface SkeletonFactorytarget - the remote object.
JonathanException - if something goes wrong.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||