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.iiop
Class IiopExporter

    java.lang.Object
      net.jini.iiop.IiopExporter

All Implemented Interfaces:
  Exporter

public final class IiopExporter
extends Object
implements Exporter

An `IiopExporter` can be used to export a single remote object to the RMI-IIOP runtime. It acts as an adapter between the `Exporter` interface and existing RMI-IIOP (un)export/utility APIs provided by the `javax.rmi` and `javax.rmi.CORBA` packages.

Note: although this exporter internally makes use of `PortableRemoteObject`, it cannot be used to export remote objects over JRMP (as `PortableRemoteObject` can). For JRMP exports, `JrmpExporter` should be used instead.

Since:
  2.0
Implementation Specifics:

  This implementation uses the `Logger` named `net.jini.iiop.IiopExporter` to log information at the following levels:

  Level | Description
  --- | ---
  `FINE` | successful export of object
  `FINE` | attempted unexport of object

Constructor Summary
`IiopExporter()` Creates a new exporter which can be used to export a remote object over IIOP.
`IiopExporter(ORB orb)` Creates a new exporter which can be used to export a remote object over IIOP.

Method Summary
`Remote` | `export(Remote impl)` Exports a remote object, `impl`, to the RMI-IIOP runtime and returns a proxy (stub) for the remote object.
`String` | `toString()` Returns the string representation for this exporter.
`boolean` | `unexport(boolean force)` Unexports the remote object exported via this exporter's `export(java.rmi.Remote)` method such that the object can no longer accept incoming remote calls that were possible as a result of exporting via this exporter.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### IiopExporter

    public IiopExporter()

  Creates a new exporter which can be used to export a remote object over IIOP. The stub resulting from an export of a remote object with this exporter will not be connected to any `ORB`.

### IiopExporter

    public IiopExporter(ORB orb)

  Creates a new exporter which can be used to export a remote object over IIOP. If the given `ORB` is non-`null`, then the stub resulting from an export of a remote object with this exporter will be connected to it; otherwise, the stub will be left unconnected.

Parameters:
  `orb` - if non-`null`, ORB to which to connect stub of exported object

Method Detail

### export

    public Remote export(Remote impl)
                  throws ExportException

  Exports a remote object, `impl`, to the RMI-IIOP runtime and returns a proxy (stub) for the remote object. If an `ORB` was specified during construction of this exporter, then the returned RMI-IIOP stub will be connected to it. This method cannot be called more than once to export a remote object or an `IllegalStateException` will be thrown.

  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 the object

### unexport

    public boolean unexport(boolean force)

  Unexports the remote object exported via this exporter's `export(java.rmi.Remote)` method such that the object can no longer accept incoming remote calls that were possible as a result of exporting via this exporter.

  This method unexports the remote object via a call to `PortableRemoteObject.unexportObject(java.rmi.Remote)`, which only supports the equivalent of a "forced" unexport (i.e., one in which the object is unexported regardless of the presence of pending or in-progress calls). Hence, this method will not consult the value of `force`, and will always attempt a "forced" unexport of the remote object, returning `true` upon normal completion.

  Specified by:
    `unexport` in interface `Exporter`
  Parameters:
    `force` - ignored value (normally indicates whether or not to unexport the object in the presence of pending or in-progress calls, but this exporter does not support "unforced" unexports)
  Returns:
    `true`
  Throws:
    `IllegalStateException` - if an object has not been exported with this `Exporter` instance

### toString

    public String toString()

  Returns the string representation for this exporter.

  Returns:
    the string representation for this exporter

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