Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.jini.activation
Class ActivationExporter

    java.lang.Object
      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

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:
  - If the class loader specified at construction is not `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.
  - The proxy implements the following ordered list of interfaces (except if the underlying proxy is an instance of `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.

  - The proxy's invocation handler is an `ActivatableInvocationHandler` instance constructed with the `ActivationID` and underlying proxy supplied during construction of this exporter.

  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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Sun Microsystems, Inc. All rights reserved