public class AtomicILFactory extends BasicILFactory
InvocationLayerFactory.
This factory is used to create a Proxy instance with a AtomicInvocationHandler and to create a AtomicInvocationDispatcher for a remote object being exported. This
factory is used in conjunction with the BasicJeriExporter class.
Serialization is performed with atomic input validation. Class codebase
annotations are not appended in the stream, instead each endpoint
must have the same class visibility via the default ClassLoader.InvocationLayerFactory.Instances| Constructor and Description |
|---|
AtomicILFactory(MethodConstraints serverConstraints,
Class proxyOrServiceImplClass)
Creates a
AtomicILFactory with the specified server
constraints, and proxy or service implementation class. |
AtomicILFactory(MethodConstraints serverConstraints,
Class permissionClass,
Class proxyOrServiceImplClass)
Creates a
AtomicILFactory with the specified server
constraints, permission class, and proxy or service implementation class. |
AtomicILFactory(MethodConstraints serverConstraints,
Class permissionClass,
ClassLoader loader)
Creates a
AtomicILFactory with the specified server
constraints, permission class, and class loader. |
| Modifier and Type | Method and Description |
|---|---|
protected InvocationDispatcher |
createInvocationDispatcher(Collection methods,
Remote impl,
ServerCapabilities caps)
Returns an invocation dispatcher to receive incoming remote calls
for the specified methods to the specified remote object, for a
server and transport with the specified capabilities.
|
protected InvocationHandler |
createInvocationHandler(Class[] interfaces,
Remote impl,
ObjectEndpoint oe)
Returns an invocation handler to use with a
Proxy instance
implementing the specified interfaces, communicating with the
specified remote object using the specified object endpoint. |
boolean |
equals(Object o)
Compares the specified object with this invocation layer factory for
equality.
|
int |
hashCode()
Returns a hash code value for this factory.
|
getExtraProxyInterfaces, getPermissionClass, getServerConstraints, toStringcreateInstances, getClassLoader, getInvocationDispatcherMethods, getProxyInterfaces, getRemoteInterfacespublic AtomicILFactory(MethodConstraints serverConstraints, Class permissionClass, ClassLoader loader)
AtomicILFactory with the specified server
constraints, permission class, and class loader. The server
constraints, if not null, are used to enforce minimum
constraints for remote calls. The permission class, if not
null, is used to perform server-side access control on
incoming remote calls. The class loader, which may be
null, is passed to the superclass constructor and is
used by the createInstances
method.serverConstraints - the server constraints, or nullpermissionClass - the permission class, or nullloader - the class loader, or nullIllegalArgumentException - if the permission class is
abstract, is not a subclass of Permission, or does
not have a public constructor that has either one
String parameter or one Method
parameter and has no declared exceptionspublic AtomicILFactory(MethodConstraints serverConstraints, Class proxyOrServiceImplClass)
AtomicILFactory with the specified server
constraints, and proxy or service implementation class.
The server constraints, if not null, are used to enforce
minimum constraints for remote calls. The proxy or service implementation class,
which cannot be null, is used to obtain the ClassLoader
to be passed to the superclass constructor and is used by the
createInstances method.serverConstraints - the server constraints, or nullproxyOrServiceImplClass - the class of the smart proxy
implementation or the class of the service implementation
for dynamic proxy's.IllegalArgumentException - if the permission class is
abstract, is not a subclass of Permission, or does
not have a public constructor that has either one
String parameter or one Method
parameter and has no declared exceptionsSecurityException - if caller doesn't have RuntimePermission
"getClassLoader".NullPointerException - if proxyorServiceImplClass is null.public AtomicILFactory(MethodConstraints serverConstraints, Class permissionClass, Class proxyOrServiceImplClass)
AtomicILFactory with the specified server
constraints, permission class, and proxy or service implementation class.
The server constraints, if not null, are used to enforce
minimum constraints for remote calls. The permission class, if not
null, is used to perform server-side access control on
incoming remote calls. The proxy or service implementation class,
which cannot be null, is used to obtain the ClassLoader
to be passed to the superclass constructor and is used by the
createInstances method.serverConstraints - the server constraints, or nullpermissionClass - the permission class, or nullproxyOrServiceImplClass - the class of the smart proxy
implementation or the class of the service implementation
for dynamic proxy's.IllegalArgumentException - if the permission class is
abstract, is not a subclass of Permission, or does
not have a public constructor that has either one
String parameter or one Method
parameter and has no declared exceptionsSecurityException - if caller doesn't have RuntimePermission
"getClassLoader".NullPointerException - if proxyorServiceImplClass is null.protected InvocationHandler createInvocationHandler(Class[] interfaces, Remote impl, ObjectEndpoint oe) throws ExportException
Proxy instance
implementing the specified interfaces, communicating with the
specified remote object using the specified object endpoint.
AtomicILFactory implements this method to
return a BasicInvocationHandler constructed with the
specified object endpoint and this factory's server constraints.
createInvocationHandler in class BasicILFactoryinterfaces - an array of proxy interfacesimpl - a remote object this invocation handler
is being created foroe - an object endpoint used to communicate with
the remote objectExportException - if there is a problem creating the
invocation handlerNullPointerException - if any argument is null,
or if interfaces contains a null
elementprotected InvocationDispatcher createInvocationDispatcher(Collection methods, Remote impl, ServerCapabilities caps) throws ExportException
AtomicILFactory implements this method to return a
BasicInvocationDispatcher instance constructed with the
specified methods, server capabilities, and this factory's
server constraints, permission class, and class loader specified
at construction.
createInvocationDispatcher in class BasicILFactorymethods - a collection of Method instances for the
remote methodsimpl - a remote object that the dispatcher is being created forcaps - the transport capabilities of the serverExportException - if there is a problem creating the
invocation dispatcher.NullPointerException - if any argument is null,
or if methods contains a null elementIllegalArgumentException - if methods contains
an element that is not a Method instancepublic boolean equals(Object o)
BasicILFactoryBasicILFactory implements this method to return
true if and only if invoking the superclass's
equals method passing the specified object returns
true, the specified object has the same class as this
object, and the server constraints and permission class are equal to
the ones in this object.
equals in class BasicILFactorypublic int hashCode()
BasicILFactoryhashCode in class BasicILFactoryCopyright © 2016–2018. All rights reserved.