|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jini.iiop.IiopExporter
public final class IiopExporter
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.
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 |
---|
public IiopExporter()
ORB
.
public IiopExporter(ORB orb)
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.
orb
- if non-null
, ORB to which to connect stub of
exported objectMethod Detail |
---|
public Remote export(Remote impl) throws ExportException
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.
export
in interface Exporter
impl
- a remote object to export
NullPointerException
- if impl
is null
IllegalStateException
- if an object has already been exported
with this Exporter
instance
ExportException
- if a problem occurs exporting the objectpublic boolean unexport(boolean force)
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.
unexport
in interface Exporter
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)
true
IllegalStateException
- if an object has not been exported
with this Exporter
instancepublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |