public final class ActivationExporter extends Object implements Exporter
Exporter implementation for exporting an activatable
remote object using its underlying exporter. The proxy returned by
the export method activates the remote object on
demand. Each instance of ActivationExporter can export only
a single remote object.| Constructor and Description |
|---|
ActivationExporter(ActivationID id,
Exporter underlyingExporter)
Creates an exporter for an activatable remote object with the
specified activation identifier, underlying exporter, and a
null class loader. |
ActivationExporter(ActivationID id,
Exporter underlyingExporter,
ClassLoader loader)
Creates an exporter for an activatable remote object with the
specified activation identifier, underlying exporter, and
class loader.
|
| Modifier and Type | Method and Description |
|---|---|
Remote |
export(Remote impl)
Exports an activatable remote object.
|
boolean |
unexport(boolean force)
Unexports the activatable remote object that was previously exported
via the
export method of the underlying exporter
supplied during construction of this exporter. |
public ActivationExporter(ActivationID id, Exporter underlyingExporter)
null class loader.id - an activation identifierunderlyingExporter - an exporterNullPointerException - if id or
underlyingExporter is nullpublic ActivationExporter(ActivationID id, Exporter underlyingExporter, ClassLoader loader)
id - an activation identifierunderlyingExporter - an exporterloader - the class loader to define the proxy class in, or
nullNullPointerException - if id or
underlyingExporter is nullpublic Remote export(Remote impl) throws ExportException
impl by calling the export method on the
underlying exporter (supplied during construction of this exporter)
to obtain an underlying proxy. It then constructs and returns a
Proxy instance where:
null, the proxy's class is defined by the specified
loader. Otherwise, if a security manager exists, its checkPermission method is invoked
with the permission RuntimePermission{"getClassLoader"); this invocation may
throw a SecurityException. If the above security check
succeeds, the proxy's class is defined by the class loader of the
underlying proxy's class.
RemoteMethodControl, the interface ProxyTrust is not among
the interfaces implemented by the proxy):
for each superclass of the underlying proxy's class, starting
with java.lang.Object and following with each direct
subclass to the direct superclass of the underlying proxy's class,
all of the direct superinterfaces of the given superclass that do
not appear previously in the list, in declaration order (the order
in which they are declared in the class's implements
clause), followed by
all of the direct superinterfaces of the underlying proxy's class that do not appear previously in the list, in declaration order.
ActivatableInvocationHandler instance constructed with the ActivationID and underlying proxy supplied during construction of
this exporter.
export in interface Exporterimpl - a remote object to exportNullPointerException - if impl is nullIllegalStateException - if an object has already been exported
with this Exporter instanceExportException - if a problem occurs exporting
impl or if the underlying proxy's class
is non-public and implements
non-public interfacesStartablepublic boolean unexport(boolean force)
export method of the underlying exporter
supplied during construction of this exporter. Returns the result
of unexporting the remote object by calling the
unexport method on the underlying exporter passing
force as the argument.unexport in interface Exporterforce - 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 progresstrue if the remote object is unexported when
this method returns and false otherwiseIllegalStateException - if an object has not been exported
with this Exporter instanceCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.