org.objectweb.easybeans.rpc
Class RemoteCallFactory
java.lang.Object
org.objectweb.easybeans.rpc.RemoteCallFactory
- All Implemented Interfaces:
- javax.naming.spi.ObjectFactory
- Direct Known Subclasses:
- EJBHomeCallFactory
public class RemoteCallFactory
- extends java.lang.Object
- implements javax.naming.spi.ObjectFactory
Factory creating an EJB proxy for remote calls.
- Author:
- Florent Benoit.
Method Summary |
protected ClientRPCInvocationHandler |
buildRemoteHandler(java.lang.String containerID,
java.lang.String factoryName,
boolean useID)
Build an instance of a remote RPC handler. |
java.lang.Object |
getObjectInstance(java.lang.Object obj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable<?,?> environment)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RemoteCallFactory
public RemoteCallFactory()
getObjectInstance
public java.lang.Object getObjectInstance(java.lang.Object obj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable<?,?> environment)
throws java.lang.Exception
- Specified by:
getObjectInstance
in interface javax.naming.spi.ObjectFactory
- Parameters:
obj
- the reference containing data to build instancename
- Name of context, relative to ctx, or null.nameCtx
- Context relative to which 'name' is named.environment
- Environment to use when creating the context *
- Returns:
- an instance of a proxy (an EJB) that handle local calls.
- Throws:
java.lang.Exception
- if this object factory encountered an exception while
attempting to create an object, and no other object factories are
to be tried.
buildRemoteHandler
protected ClientRPCInvocationHandler buildRemoteHandler(java.lang.String containerID,
java.lang.String factoryName,
boolean useID)
- Build an instance of a remote RPC handler. Can be used by subclasses to change the object.
- Parameters:
containerID
- the id of the container that will be called on the
remote side.factoryName
- the name of the remote factory.useID
- true if all instance build with this ref are unique
(stateful), false if it references the same object (stateless)
- Returns:
- an instance of a remote handler.