<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!-- NewPage --> | |
<html lang="en"> | |
<head> | |
<!-- Generated by javadoc (1.8.0) on Sun Aug 28 20:41:46 EST 2016 --> | |
<title>net.jini.export (Apache River v3.0.0 Specification-only API Documentation)</title> | |
<meta name="date" content="2016-08-28"> | |
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> | |
<script type="text/javascript" src="../../../script.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"><!-- | |
try { | |
if (location.href.indexOf('is-external=true') == -1) { | |
parent.document.title="net.jini.export (Apache River v3.0.0 Specification-only API Documentation)"; | |
} | |
} | |
catch(err) { | |
} | |
//--> | |
</script> | |
<noscript> | |
<div>JavaScript is disabled on your browser.</div> | |
</noscript> | |
<!-- ========= START OF TOP NAVBAR ======= --> | |
<div class="topNav"><a name="navbar.top"> | |
<!-- --> | |
</a> | |
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> | |
<a name="navbar.top.firstrow"> | |
<!-- --> | |
</a> | |
<ul class="navList" title="Navigation"> | |
<li><a href="../../../overview-summary.html">Overview</a></li> | |
<li class="navBarCell1Rev">Package</li> | |
<li>Class</li> | |
<li><a href="package-use.html">Use</a></li> | |
<li><a href="package-tree.html">Tree</a></li> | |
<li><a href="../../../deprecated-list.html">Deprecated</a></li> | |
<li><a href="../../../index-all.html">Index</a></li> | |
<li><a href="../../../help-doc.html">Help</a></li> | |
</ul> | |
</div> | |
<div class="subNav"> | |
<ul class="navList"> | |
<li><a href="../../../net/jini/entry/package-summary.html">Prev Package</a></li> | |
<li><a href="../../../net/jini/id/package-summary.html">Next Package</a></li> | |
</ul> | |
<ul class="navList"> | |
<li><a href="../../../index.html?net/jini/export/package-summary.html" target="_top">Frames</a></li> | |
<li><a href="package-summary.html" target="_top">No Frames</a></li> | |
</ul> | |
<ul class="navList" id="allclasses_navbar_top"> | |
<li><a href="../../../allclasses-noframe.html">All Classes</a></li> | |
</ul> | |
<div> | |
<script type="text/javascript"><!-- | |
allClassesLink = document.getElementById("allclasses_navbar_top"); | |
if(window==top) { | |
allClassesLink.style.display = "block"; | |
} | |
else { | |
allClassesLink.style.display = "none"; | |
} | |
//--> | |
</script> | |
</div> | |
<a name="skip.navbar.top"> | |
<!-- --> | |
</a></div> | |
<!-- ========= END OF TOP NAVBAR ========= --> | |
<div class="header"> | |
<h1 title="Package" class="title">Package net.jini.export</h1> | |
<div class="docSummary"> | |
<div class="block">Provides generic abstractions for exporting remote objects (<a href="../../../net/jini/export/Exporter.html" title="interface in net.jini.export"><code>Exporter</code></a>), obtaining a proxy from an exported remote | |
object (<a href="../../../net/jini/export/ProxyAccessor.html" title="interface in net.jini.export"><code>ProxyAccessor</code></a>), obtaining the | |
server-side context information for an executing remote call (<a href="../../../net/jini/export/ServerContext.html" title="class in net.jini.export"><code>ServerContext</code></a>), and defining export permissions | |
(<a href="../../../net/jini/export/ExportPermission.html" title="class in net.jini.export"><code>ExportPermission</code></a>).</div> | |
</div> | |
<p>See: <a href="#package.description">Description</a></p> | |
</div> | |
<div class="contentContainer"> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Interface Summary table, listing interfaces, and an explanation"> | |
<caption><span>Interface Summary</span><span class="tabEnd"> </span></caption> | |
<tr> | |
<th class="colFirst" scope="col">Interface</th> | |
<th class="colLast" scope="col">Description</th> | |
</tr> | |
<tbody> | |
<tr class="altColor"> | |
<td class="colFirst"><a href="../../../net/jini/export/Exporter.html" title="interface in net.jini.export">Exporter</a></td> | |
<td class="colLast"> | |
<div class="block">An abstraction for exporting a single remote | |
object such that it can receive remote method invocations, and | |
later for unexporting that same remote object.</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><a href="../../../net/jini/export/ProxyAccessor.html" title="interface in net.jini.export">ProxyAccessor</a></td> | |
<td class="colLast"> | |
<div class="block">Provides a means to obtain a proxy from an exported remote object.</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><a href="../../../net/jini/export/ServerContext.Spi.html" title="interface in net.jini.export">ServerContext.Spi</a></td> | |
<td class="colLast"> | |
<div class="block">Defines the interface for server context providers, which are | |
consulted by <a href="../../../net/jini/export/ServerContext.html#getServerContext--"><code>ServerContext.getServerContext()</code></a> if no server context | |
has been explicitly associated with the current thread via a previous | |
call to <a href="../../../net/jini/export/ServerContext.html#doWithServerContext-java.lang.Runnable-java.util.Collection-"><code>ServerContext.doWithServerContext(java.lang.Runnable, java.util.Collection)</code></a>.</div> | |
</td> | |
</tr> | |
</tbody> | |
</table> | |
</li> | |
<li class="blockList"> | |
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> | |
<caption><span>Class Summary</span><span class="tabEnd"> </span></caption> | |
<tr> | |
<th class="colFirst" scope="col">Class</th> | |
<th class="colLast" scope="col">Description</th> | |
</tr> | |
<tbody> | |
<tr class="altColor"> | |
<td class="colFirst"><a href="../../../net/jini/export/ExportPermission.html" title="class in net.jini.export">ExportPermission</a></td> | |
<td class="colLast"> | |
<div class="block">Defines runtime permissions for <code>Exporter</code> implementations.</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><a href="../../../net/jini/export/ServerContext.html" title="class in net.jini.export">ServerContext</a></td> | |
<td class="colLast"> | |
<div class="block">The <code>ServerContext</code> class contains static methods to | |
execute some action within an appropriate server context for the | |
current thread and to obtain the server context for the current thread.</div> | |
</td> | |
</tr> | |
</tbody> | |
</table> | |
</li> | |
</ul> | |
<a name="package.description"> | |
<!-- --> | |
</a> | |
<h2 title="Package net.jini.export Description">Package net.jini.export Description</h2> | |
<div class="block">Provides generic abstractions for exporting remote objects (<a href="../../../net/jini/export/Exporter.html" title="interface in net.jini.export"><code>Exporter</code></a>), obtaining a proxy from an exported remote | |
object (<a href="../../../net/jini/export/ProxyAccessor.html" title="interface in net.jini.export"><code>ProxyAccessor</code></a>), obtaining the | |
server-side context information for an executing remote call (<a href="../../../net/jini/export/ServerContext.html" title="class in net.jini.export"><code>ServerContext</code></a>), and defining export permissions | |
(<a href="../../../net/jini/export/ExportPermission.html" title="class in net.jini.export"><code>ExportPermission</code></a>). These abstractions are | |
independent of communication protocols, remote invocation semantics, | |
and other details of remote object behavior. | |
<a name="Requirements"><h2>Requirements</h2></a> | |
The <code>Exporter</code> abstraction is intended to satisfy the | |
following requirements: | |
<ul> | |
<li> support a variety of implementations for exporting and | |
unexporting remote objects using a protocol independent API | |
<li> support exporting a given remote object to multiple runtimes | |
</ul> | |
<a name="Exporter"><h2>Exporter</h2></a> | |
<p>The interface <a href="../../../net/jini/export/Exporter.html" title="interface in net.jini.export"><code>Exporter</code></a> is a | |
high-level API for both <i>exporting</i> a single remote object so | |
that it can receive remote method invocations, and <i>unexporting</i> | |
that same remote object. Applications can use a <a href="../../../net/jini/config/Configuration.html" title="interface in net.jini.config"><code>Configuration</code></a> provider together with | |
the <code>Exporter</code> interface to export remote objects in a way | |
that can be configured and deployed at run-time to use specific | |
implementations of the <code>Exporter</code> interface. See the <a | |
href="../config/package-summary.html#Example"><code>net.jini.config</code> | |
package</a> documentation for examples on configurable exporting. | |
<p>Several implementations of the <code>Exporter</code> interface are provided: | |
<blockquote><table summary="Describes built-in exporter implementations" | |
cellpadding=3 cellspacing=3> | |
<tr> | |
<td valign=top><a href="../../../net/jini/jrmp/JrmpExporter.html" title="class in net.jini.jrmp"><code>JrmpExporter</code></a></td> | |
<td>Exports an object using the Java(TM) Remote Method Invocation | |
(Java RMI) implementation in Java 2, SDK, Standard Edition | |
(J2SE(TM)). The behavior of remote objects exported via a | |
<code>JrmpExporter</code> are the same as the behavior of objects | |
exported via equivalent <code>exportObject</code> methods of the | |
<code>java.rmi.server.UnicastRemoteObject</code> and | |
<code>java.rmi.activation.Activatable</code> classes.</td> | |
</tr> | |
<tr> | |
<td valign=top><a href="../../../net/jini/iiop/IiopExporter.html" title="class in net.jini.iiop"><code>IiopExporter</code></a></td> | |
<td>Exports an object using the Java Remote Method Invocation over | |
Internet-ORB Protocol technology (RMI-IIOP) in J2SE. The behavior of | |
remote objects exported via an <code>IiopExporter</code> are the same | |
as the behavior of objects exported via the <code>exportObject</code> | |
method of the class <code>javax.rmi.PortableRemoteObject</code> and | |
(where appropriate) connected to an <code>ORB</code> via the | |
<code>connect</code> method of <code>javax.rmi.CORBA.Stub</code>.</td> | |
</tr> | |
<tr> | |
<td valign=top><a href="../../../net/jini/jeri/BasicJeriExporter.html" title="class in net.jini.jeri"><code>BasicJeriExporter</code></a></td> | |
<td>Exports an object to use Jini extensible remote invocation | |
(Jini ERI). A remote object exported with | |
<code>BasicJeriExporter</code> can have associated custom remote | |
invocation and dispatch behavior, as well as a customized | |
communication protocol.</td> | |
</tr></table></blockquote> | |
<p>The details of export and unexport behavior, including | |
communication protocols used for remote invocation and additional | |
invocation semantics, are defined by the particular implementation of | |
the <code>Exporter</code> interface. | |
<p>To export a remote object, an application needs to either construct | |
a new instance of an <code>Exporter</code> implementation explicitly | |
or use the <code>Configuration.getEntry</code> method to obtain a new | |
instance of an <code>Exporter</code> implementation. It is preferable | |
to obtain exporters via the <code>Configuration</code> provider | |
because doing so eliminates application code dependency on specific | |
<code>Exporter</code> implementations. Only a single object can be | |
exported per <code>Exporter</code> instance. Since an exporter hides | |
all the details of export behavior (for example, an object or | |
activation identifier) and such information in many cases is only | |
applicable to a single object, it simplifies the abstraction and the | |
programming model to require a new exporter per export. | |
<p>The <code>export</code> method exports a remote object and returns | |
a proxy that implements all the remote interfaces of the remote object | |
and that can be used to invoke remote methods on that exported remote | |
object. The caller should not make any assumptions about the behavior | |
of the <code>Exporter</code> implementation to which the object was | |
exported, the implementation of the returned proxy (for example, it | |
need not be a "stub" class as defined in the Java RMI specification), or | |
the communication protocols used by the returned proxy to invoke | |
remote methods. | |
<p>A remote object exported via a given <code>Exporter</code> instance | |
can later be unexported by invoking the <code>unexport</code> method | |
of that <code>Exporter</code> instance. | |
<a name="ProxyAccessor"><h2>ProxyAccessor</h2></a> | |
<p>The interface <a href="../../../net/jini/export/ProxyAccessor.html" title="interface in net.jini.export"><code>ProxyAccessor</code></a> provides a | |
means to obtain a proxy for an exported remote object and is typically | |
used in conjunction with activatable remote objects. An activatable | |
remote object should implement this interface so that the activation | |
group can obtain the remote object's proxy once the remote object is | |
created (activated) and exported. If an activatable remote object | |
does not implement this interface, it must define a constructor that | |
takes as arguments an <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/activation/ActivationID.html?is-external=true" title="class or interface in java.rmi.activation"><code>ActivationID</code></a> and a | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/MarshalledObject.html?is-external=true" title="class or interface in java.rmi"><code>MarshalledObject</code></a>, and it must be serializable and | |
marshalling the object produces a suitable proxy for the remote | |
object. | |
<a name="ServerContext"><h2>ServerContext</h2></a> | |
<p>The class <a href="../../../net/jini/export/ServerContext.html" title="class in net.jini.export"><code>ServerContext</code></a> | |
provides a generic API for associating and obtaining server context | |
information for a remote call executing in the current thread. | |
The class contains static methods for obtaining the server context for | |
the current thread (<code>ServerContext.getServerContext</code>) and | |
for executing some action within a given server context | |
(<code>ServerContext.doWithServerContext</code>). In addition, the | |
<code>ServerContext</code> class provides the interface <a href="../../../net/jini/export/ServerContext.Spi.html" title="interface in net.jini.export"><code>ServerContext.Spi</code></a> for server context | |
providers that are consulted to obtain a server context if one is not | |
already associated with the current thread via the | |
<code>ServerContext.doWithServerContext</code> method. | |
<p>The context information available from a given element of the | |
collection is determined by that element's type. Examples of types | |
that a given element might implement include: | |
<ul> | |
<li><a href="../../../net/jini/io/context/ClientHost.html" title="interface in net.jini.io.context"><code>ClientHost</code></a> | |
<li><a href="../../../net/jini/io/context/ClientSubject.html" title="interface in net.jini.io.context"><code>ClientSubject</code></a> | |
<li><a href="../../../net/jini/io/context/IntegrityEnforcement.html" title="interface in net.jini.io.context"><code>IntegrityEnforcement</code></a> | |
</ul> | |
<p>A remote object does not itself set up a <code>ServerContext</code>, | |
rather the <code>Exporter</code> implementation that | |
dispatches incoming calls to its exported remote objects may establish | |
one for each call that it services. | |
<p>For supplying context information for remote method execution, the | |
<code>BasicJeriExporter</code> implementation uses the method | |
<code>doWithServerContext</code> and the <code>JrmpExporter</code> | |
implementation uses the provider interface | |
<code>ServerContext.Spi</code>. The <code>IiopExporter</code> | |
implementation does not support the <code>ServerContext</code> API in | |
supplying context information for incoming calls dispatched to its | |
exported objects. | |
<a name="ExportPermission"><h2>ExportPermission</h2></a> | |
<p>The class <a href="../../../net/jini/export/ExportPermission.html" title="class in net.jini.export"><code>ExportPermission</code></a> | |
defines runtime permissions associated with export-related | |
operations. When invoking <a href="../../../net/jini/jeri/AbstractILFactory.html#getInvocationDispatcherMethods-java.rmi.Remote-"><code>AbstractILFactory.getInvocationDispatcherMethods(java.rmi.Remote)</code></a>, the calling | |
context must have been granted the permission | |
<code>ExportPermission("exportRemoteInterface.<i>interfaceName</i>")</code> | |
for each non-public remote interface the supplied remote object | |
implements. | |
<p></div> | |
<dl> | |
<dt><span class="simpleTagLabel">Since:</span></dt> | |
<dd>2.0</dd> | |
<dt><span class="simpleTagLabel">Version:</span></dt> | |
<dd>1.1</dd> | |
</dl> | |
</div> | |
<!-- ======= START OF BOTTOM NAVBAR ====== --> | |
<div class="bottomNav"><a name="navbar.bottom"> | |
<!-- --> | |
</a> | |
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> | |
<a name="navbar.bottom.firstrow"> | |
<!-- --> | |
</a> | |
<ul class="navList" title="Navigation"> | |
<li><a href="../../../overview-summary.html">Overview</a></li> | |
<li class="navBarCell1Rev">Package</li> | |
<li>Class</li> | |
<li><a href="package-use.html">Use</a></li> | |
<li><a href="package-tree.html">Tree</a></li> | |
<li><a href="../../../deprecated-list.html">Deprecated</a></li> | |
<li><a href="../../../index-all.html">Index</a></li> | |
<li><a href="../../../help-doc.html">Help</a></li> | |
</ul> | |
</div> | |
<div class="subNav"> | |
<ul class="navList"> | |
<li><a href="../../../net/jini/entry/package-summary.html">Prev Package</a></li> | |
<li><a href="../../../net/jini/id/package-summary.html">Next Package</a></li> | |
</ul> | |
<ul class="navList"> | |
<li><a href="../../../index.html?net/jini/export/package-summary.html" target="_top">Frames</a></li> | |
<li><a href="package-summary.html" target="_top">No Frames</a></li> | |
</ul> | |
<ul class="navList" id="allclasses_navbar_bottom"> | |
<li><a href="../../../allclasses-noframe.html">All Classes</a></li> | |
</ul> | |
<div> | |
<script type="text/javascript"><!-- | |
allClassesLink = document.getElementById("allclasses_navbar_bottom"); | |
if(window==top) { | |
allClassesLink.style.display = "block"; | |
} | |
else { | |
allClassesLink.style.display = "none"; | |
} | |
//--> | |
</script> | |
</div> | |
<a name="skip.navbar.bottom"> | |
<!-- --> | |
</a></div> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
</body> | |
</html> |