|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.jini.security.proxytrust.ProxyTrustExporter
public class ProxyTrustExporter
Contains the information necessary to export a remote object that has a
proxy that will not directly be considered trusted by clients, such that
the proxy can be trusted by clients using ProxyTrustVerifier
. The
remote object to be exported (called the main remote object) must be an
instance of ServerProxyTrust
. In addition to exporting the main
remote object, this exporter also exports a second remote object
(called the bootstrap remote object, which is created internally by this
exporter) that implements the ProxyTrust
interface by delegating
the getProxyVerifier
method to the
corresponding getProxyVerifier
method of the main remote object. (see also net.jini.jeri.ProxyTrustILFactory)
Constructor Summary | |
---|---|
ProxyTrustExporter(Exporter mainExporter,
Exporter bootExporter)
Creates an instance with the specified main exporter (which will be used to export the main remote object) and the specified bootstrap exporter (which will be used to export the bootstrap remote object). |
|
ProxyTrustExporter(Exporter mainExporter,
Exporter bootExporter,
ClassLoader loader)
Creates an instance with the specified main exporter (which will be used to export the main remote object), the specified bootstrap exporter (which will be used to export the bootstrap remote object), and the specified class loader (in which the generated dynamic proxy class will be defined). |
Method Summary | |
---|---|
Remote |
export(Remote impl)
Exports the specified main remote object and returns a dynamic proxy for the object. |
boolean |
unexport(boolean force)
Unexports the remote objects that were previously exported via this exporter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProxyTrustExporter(Exporter mainExporter, Exporter bootExporter)
RemoteMethodControl
and
TrustEquivalence
, and if the main proxy's class is not
public
, the direct superinterfaces of that class and all
of its superclasses must be public
. The bootstrap
exporter, when used to export a remote object that is an instance of
ProxyTrust
, must produce a proxy (called the bootstrap proxy)
that is an instance of ProxyTrust
,
RemoteMethodControl
, and TrustEquivalence
,
and should satisfy the bootstrap proxy requirements of
ProxyTrustVerifier
.
The dynamic proxy class generated at export will be defined
by the same class loader as the main proxy's class.
mainExporter
- the main exporter, for the main remote objectbootExporter
- the bootstrap exporter, for the bootstrap remote
object
NullPointerException
- if any argument is null
public ProxyTrustExporter(Exporter mainExporter, Exporter bootExporter, ClassLoader loader)
RemoteMethodControl
and TrustEquivalence
, and if the main proxy's class is not
public
, the direct superinterfaces of that class and all
of its superclasses must be public
. The bootstrap
exporter, when used to export a remote object that is an instance of
ProxyTrust
, must produce a proxy (called the bootstrap proxy)
that is an instance of ProxyTrust
,
RemoteMethodControl
, and TrustEquivalence
,
and should satisfy the bootstrap proxy requirements of
ProxyTrustVerifier
.
If the specified class loader is null
, the
dynamic proxy class generated at export will be defined by the same
class loader as the main proxy's class.
mainExporter
- the main exporter, for the main remote objectbootExporter
- the bootstrap exporter, for the bootstrap remote
objectloader
- the class loader to define the proxy class in, or
null
NullPointerException
- if either exporter argument is
null
Method Detail |
---|
public Remote export(Remote impl) throws ExportException
ServerProxyTrust
. The main remote object is exported using the
main exporter (specified at the construction of this exporter),
returning a proxy called the main proxy. The main proxy must be an
instance of both RemoteMethodControl
and
TrustEquivalence
, and if the main proxy's class is not
public
, the direct superinterfaces of that class and all
of its superclasses must be public
. A bootstrap remote
object that is an instance of ProxyTrust
is created and
exported using the bootstrap exporter (also specified at the
construction of this exporter), returning a proxy called the bootstrap
proxy. The bootstrap proxy must be an instance of
ProxyTrust
, RemoteMethodControl
, and
TrustEquivalence
. The bootstrap remote object will remain
reachable as long as the main remote object is reachable and the
unexport
method of this exporter has not returned
true
. A Proxy
class is generated that implements
the direct superinterfaces of the main proxy's class and all of its
superclasses, in the following order: the direct superinterfaces of a
class immediately follow the direct superinterfaces of its direct
superclass; the direct superinterfaces of a class are in declaration
order (the order in which they are declared in the class's
implements
clause); and if an interface appears more than
once, only the first instance is retained. If a non-null
class loader was specified at the construction of this exporter, the
generated class is defined by that class loader, otherwise it is
defined by the class loader of the main proxy's class. The dynamic
proxy returned by this method is an instance of that generated class,
containing a ProxyTrustInvocationHandler
instance created with
the main proxy and the bootstrap proxy.
export
in interface Exporter
impl
- a remote object to export
ExportException
- if the export of either remote object throws
ExportException
, or if the export the bootstrap remote
object throws IllegalArgumentException
, or if the main
proxy is not an instance of both RemoteMethodControl
and
TrustEquivalence
, or if the main proxy's class is not
public
and it or a superclass has a
non-public
direct superinterface, or if the bootstrap
proxy is not an instance of ProxyTrust
,
RemoteMethodControl
, and TrustEquivalence
,
or if any of the superinterfaces of the main proxy's class are not
visible through the class loader specified at the construction of this
exporter
IllegalArgumentException
- if the specified remote object is not
an instance of ServerProxyTrust
, or if the export of the
main remote object throws IllegalArgumentException
IllegalStateException
- if the export of either remote object
throws IllegalStateException
SecurityException
- if a non-null
class loader was
not specified at the construction of this exporter and the calling
context does not have
RuntimePermission
("getClassLoader")
permissionpublic boolean unexport(boolean force)
unexport
method of the main exporter is
called with the specified argument and if that returns
true
, the unexport
method of the bootstrap
exporter is called with true
. The result of the main
unexport
call is returned by this method. Any exception
thrown by either unexport
call is rethrown by this
method.
unexport
in interface Exporter
force
- if true
, the remote object will be
unexported even if there are remote calls pending or in progress;
if false
, the remote object may only be unexported if
there are no known remote calls pending or in progress
true
if the remote object is unexported when
this method returns and false
otherwise
IllegalStateException
- if the unexport of either remote object
throws IllegalStateException
|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |