|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.emory.mathcs.rmix.Rmix
This class provides a facade through which most of the client-side RMIX API is exposed. The API has a set of methods to export remote objects (creating server references) and to create remote stubs by binding to remote references obtained for that server references. The API also enables management of RMIX providers, allowing to explicitly load and unload them at run time. Additionally, methods are provided to generate and compare globally unique object identifiers.
| Nested Class Summary | |
static interface |
Rmix.Binder
Entity capable of binding (creating stubs for) remote
references. |
static class |
Rmix.ClientContext
Invocation context at the client side as represented by the stub on which remote call was invoked. |
static interface |
Rmix.Context
Represents the RMIX context of the current operation. |
static interface |
Rmix.Executor
|
static interface |
Rmix.Exporter
Entity capable of exporting remote
objects. |
static interface |
Rmix.Future
|
static class |
Rmix.GetClassLoaderForExportAction
Providers should use the class loader returned by this method for remote method dispatch on the target object. |
static class |
Rmix.LocalInvocationContext
Used by RMIX providers that wish to support local bindings. |
static class |
Rmix.ProviderHook
Handle handed out to RMIX providers that allows them to interoperate with RMIX framework. |
static class |
Rmix.ServerContext
Invocation context at the server side as represented by the server reference on which remote call is dispatched, and the information about the transport. |
| Method Summary | |
static java.rmi.Remote |
bind(RemoteRef remoteRef)
Creates dynamic proxy for a given remote reference using default bind properties. |
static java.rmi.Remote |
bind(RemoteRef remoteRef,
Parameters bindParams,
java.lang.ClassLoader cloader,
boolean resolveAll)
Creates dynamic proxy for a given remote reference using specified bind parameters and a given class loader. |
static java.lang.String |
defaultProtocol()
Gets the name of the default RMIX protocol. |
static java.lang.String |
defaultProvider()
Gets the name of the default RMIX provider. |
static ServerRef |
export(InvocationTarget target)
Exports the remote object using default export properties. |
static ServerRef |
export(InvocationTarget target,
ServerRef context)
Exports the remote object using export properties from a given context server reference. |
static ServerRef |
export(InvocationTarget target,
java.lang.String protocol,
Parameters exportParams)
Exports the remote object specified as the invocation target using specified protocol and parameters. |
static ServerRef |
export(InvocationTarget target,
java.lang.String protocol,
java.lang.String provider,
Parameters exportParams)
Exports the remote object specified as the invocation target using specified RMIX protocol, provider and parameters. |
static ServerRef |
export(java.rmi.Remote target)
Exports the remote object using default export properties. |
static ServerRef |
export(java.rmi.Remote target,
ServerRef context)
Exports the remote object using export properties from a given context server reference. |
static ServerRef |
export(java.rmi.Remote target,
java.lang.String protocol,
Parameters exportParams)
Exports the remote object using specified protocol and parameters. |
static ServerRef |
export(java.rmi.Remote target,
java.lang.String protocol,
java.lang.String provider,
Parameters exportParams)
Exports the remote object using specified protocol, provider and parameters. |
static Rmix.ClientContext |
getClientContext()
During remote call processing on the client side, returns the current RMIX client context; otherwise, returns null. |
static ObjGUID |
getObjGUID(java.lang.Object obj)
Returns unique identifier (ObjGUID) associated with a given object. |
static java.util.Properties |
getRmixConfiguration()
|
static java.lang.String |
getRmixConfigurationProperty(java.lang.String name)
|
static java.lang.String |
getRmixConfigurationProperty(java.lang.String name,
java.lang.String defVal)
|
static Rmix.ServerContext |
getServerContext()
During remote call dispatch on the server side, returns the current RMIX server context; otherwise, returns null. |
static ObjGUID |
getTargetGUID(java.lang.Object obj)
Returns unique identifier (ObjGUID) associated with the given remote object. |
static java.lang.String[] |
listProtocols()
|
static java.lang.String[] |
listProviders()
|
static java.rmi.Remote |
wrap(java.rmi.Remote target)
Creates serializable dynamic proxy for a given target object with a default protocol service provider, using current thread's context class loader and resolving all interfaces. |
static java.rmi.Remote |
wrap(java.rmi.Remote target,
java.lang.String protocol)
Creates serializable dynamic proxy for a given target object with specified protocol service provider, using current thread's context class loader and resolving all interfaces. |
static java.rmi.Remote |
wrap(java.rmi.Remote target,
java.lang.String protocol,
java.lang.ClassLoader cloader,
boolean resolveAll)
Creates serializable dynamic proxy for a given target object with specified protocol service provider and using specified class loader. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static java.util.Properties getRmixConfiguration()
public static java.lang.String getRmixConfigurationProperty(java.lang.String name)
public static java.lang.String getRmixConfigurationProperty(java.lang.String name,
java.lang.String defVal)
public static java.lang.String[] listProviders()
public static java.lang.String[] listProtocols()
public static ObjGUID getObjGUID(java.lang.Object obj)
obj - object to return the ObjGUID for
public static ObjGUID getTargetGUID(java.lang.Object obj)
obj - the object to return the ObjGUID for
obj.
public static ServerRef export(java.rmi.Remote target)
throws java.rmi.RemoteException
target - remote object to export.
java.rmi.RemoteException - if export fails.
public static ServerRef export(InvocationTarget target)
throws java.rmi.RemoteException
target - remote target to export.
java.rmi.RemoteException - if export fails.
public static ServerRef export(java.rmi.Remote target,
ServerRef context)
throws java.rmi.RemoteException
target - remote target to export.context - the server reference to use as a context.
java.rmi.RemoteException - if export fails.
public static ServerRef export(InvocationTarget target,
ServerRef context)
throws java.rmi.RemoteException
target - remote target to export.context - the server reference to use as a context.
java.rmi.RemoteException - if export fails.
public static ServerRef export(java.rmi.Remote target,
java.lang.String protocol,
Parameters exportParams)
throws ProviderNotFoundException,
java.rmi.RemoteException,
IllegalParameterException
protocol - name of RMIX protocol to use.target - remote object to export.exportParams - export parameters.
ProviderNotFoundException - if the protocol service provider
cannot be found.
java.rmi.RemoteException - if export fails.
IllegalParameterException - if the provider encounters unsupported
or illegal export parameter.
public static ServerRef export(InvocationTarget target,
java.lang.String protocol,
Parameters exportParams)
throws ProviderNotFoundException,
java.rmi.RemoteException,
IllegalParameterException
protocol - name of RMIX protocol to use.target - remote object to export.exportParams - export parameters.
ProviderNotFoundException - if the protocol service provider
cannot be found.
java.rmi.RemoteException - if export fails.
IllegalParameterException - if the provider encounters unsupported
or illegal export parameter.
public static ServerRef export(java.rmi.Remote target,
java.lang.String protocol,
java.lang.String provider,
Parameters exportParams)
throws ProviderNotFoundException,
java.rmi.RemoteException,
IllegalParameterException
protocol - name of RMIX protocol to use.provider - name of RMIX provider to use.target - remote object to export.exportParams - export parameters.
ProviderNotFoundException - if the protocol service provider
cannot be found.
java.rmi.RemoteException - if export fails.
IllegalParameterException - if the provider encounters unsupported
or illegal export parameter.
public static ServerRef export(InvocationTarget target,
java.lang.String protocol,
java.lang.String provider,
Parameters exportParams)
throws ProviderNotFoundException,
java.rmi.RemoteException,
IllegalParameterException
protocol - name of RMIX protocol to use.provider - name of RMIX provider to use.target - the target to export.exportParams - export parameters.
ProviderNotFoundException - if the protocol service provider
cannot be found.
java.rmi.RemoteException - if export fails.
IllegalParameterException - if the provider encounters unsupported
or illegal export parameter.
public static java.rmi.Remote bind(RemoteRef remoteRef)
throws java.lang.ClassNotFoundException,
InvalidInterfaceException
bind(remoteRef, null, null, true) thus using
default parameters, thread's context class loader and resolving all
remote interfaces. However, if this call is performed by the RMIX
provider handling a remote call at the client side, the properties of
the original stub are used instead.
remoteRef - remote reference to to bind to
java.lang.ClassNotFoundException - if some of remote interfaces cannot be
resolved
InvalidInterfaceException - if some of interfaces are not valid
remote interfaces
public static java.rmi.Remote bind(RemoteRef remoteRef,
Parameters bindParams,
java.lang.ClassLoader cloader,
boolean resolveAll)
throws java.lang.ClassNotFoundException,
InvalidInterfaceException,
IllegalParameterException
remoteRef - remote reference to to bind to.cloader - class loader used to define proxy and load interfaces.resolveAll - if true, all remote interfaces must be resolved
or ClassNotFoundException will be thrown.
java.lang.ClassNotFoundException - if resolveAll set to true and some
of remote interfaces cannot be resolved by the specified
class loader.
InvalidInterfaceException - if some of interfaces are not valid
remote interfaces.
IllegalParameterException - if the provider encounters unsupported
or illegal bind parameter.
public static java.rmi.Remote wrap(java.rmi.Remote target)
throws java.rmi.RemoteException,
java.lang.ClassNotFoundException,
InvalidInterfaceException
target - remote object to export.
java.rmi.RemoteException - if export fails.
java.lang.ClassNotFoundException - if some of target's remote interfaces
cannot be resolved.
InvalidInterfaceException - if some of target's remote interfaces
are not valid.
public static java.rmi.Remote wrap(java.rmi.Remote target,
java.lang.String protocol)
throws ProviderNotFoundException,
java.rmi.RemoteException,
java.lang.ClassNotFoundException,
InvalidInterfaceException
target - remote object to export.protocol - protocol name
java.rmi.RemoteException - if export fails.
ProviderNotFoundException - if requested provider cannot be found
java.lang.ClassNotFoundException - if some of remote interfaces cannot be
resolved.
InvalidInterfaceException - if some of interfaces are not valid
remote interfaces.
public static java.rmi.Remote wrap(java.rmi.Remote target,
java.lang.String protocol,
java.lang.ClassLoader cloader,
boolean resolveAll)
throws ProviderNotFoundException,
java.rmi.RemoteException,
java.lang.ClassNotFoundException,
InvalidInterfaceException
target - remote object to export.protocol - protocol name.cloader - class loader used to define proxy and load interfaces.resolveAll - if true, all remote interfaces must be resolved
or ClassNotFoundException will be thrown.
ProviderNotFoundException - if requested provider cannot be found.
java.rmi.RemoteException - if export fails.
java.lang.ClassNotFoundException - if resolveAll set to true and some
of remote interfaces cannot be resolved by the specified
class loader.
InvalidInterfaceException - if some of interfaces are not valid
remote interfaces.public static java.lang.String defaultProvider()
public static java.lang.String defaultProtocol()
public static Rmix.ClientContext getClientContext()
public static Rmix.ServerContext getServerContext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||