GigaSpaces XAP 9.7.2 API

net.jini.activation
Class ActivationExporter

java.lang.Object
  extended by net.jini.activation.ActivationExporter
All Implemented Interfaces:
Exporter

public final class ActivationExporter
extends Object
implements Exporter

An 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.

Since:
2.0
Author:
Sun Microsystems, Inc.

Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivationExporter

public 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.

Parameters:
id - an activation identifier
underlyingExporter - an exporter
Throws:
NullPointerException - if id or underlyingExporter is null

ActivationExporter

public 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.

Parameters:
id - an activation identifier
underlyingExporter - an exporter
loader - the class loader to define the proxy class in, or null
Throws:
NullPointerException - if id or underlyingExporter is null
Method Detail

export

public Remote export(Remote impl)
              throws ExportException
Exports an activatable remote object. This exporter exports 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:

Specified by:
export in interface Exporter
Parameters:
impl - a remote object to export
Returns:
a proxy for the remote object
Throws:
NullPointerException - if impl is null
IllegalStateException - if an object has already been exported with this Exporter instance
ExportException - if a problem occurs exporting impl or if the underlying proxy's class is non-public and implements non-public interfaces

unexport

public 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. Returns the result of unexporting the remote object by calling the unexport method on the underlying exporter passing force as the argument.

Specified by:
unexport in interface Exporter
Parameters:
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
Returns:
true if the remote object is unexported when this method returns and false otherwise
Throws:
IllegalStateException - if an object has not been exported with this Exporter instance

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.