blob: 7949c0171fc32da95adb2754f1c0bc33ebd83c81 [file] [log] [blame]
<!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:43 EST 2016 -->
<title>BasicInvocationDispatcher (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="BasicInvocationDispatcher (Apache River v3.0.0 Specification-only API Documentation)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":9,"i2":9,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</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><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/BasicInvocationDispatcher.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/jeri/BasicILFactory.html" title="class in net.jini.jeri"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../net/jini/jeri/BasicInvocationHandler.html" title="class in net.jini.jeri"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?net/jini/jeri/BasicInvocationDispatcher.html" target="_top">Frames</a></li>
<li><a href="BasicInvocationDispatcher.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;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>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">net.jini.jeri</div>
<h2 title="Class BasicInvocationDispatcher" class="title">Class BasicInvocationDispatcher</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>net.jini.jeri.BasicInvocationDispatcher</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../net/jini/jeri/InvocationDispatcher.html" title="interface in net.jini.jeri">InvocationDispatcher</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">BasicInvocationDispatcher</span>
extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../net/jini/jeri/InvocationDispatcher.html" title="interface in net.jini.jeri">InvocationDispatcher</a></pre>
<div class="block">A basic implementation of the <a href="../../../net/jini/jeri/InvocationDispatcher.html" title="interface in net.jini.jeri"><code>InvocationDispatcher</code></a> interface,
providing preinvocation access control for
remote objects exported using <a href="../../../net/jini/jeri/BasicJeriExporter.html" title="class in net.jini.jeri"><code>BasicJeriExporter</code></a>.
<p>This invocation dispatcher handles incoming remote method invocations
initiated by proxies using <a href="../../../net/jini/jeri/BasicInvocationHandler.html" title="class in net.jini.jeri"><code>BasicInvocationHandler</code></a>, and expects
that a dispatched request, encapsulated in the <a href="../../../net/jini/jeri/InboundRequest.html" title="interface in net.jini.jeri"><code>InboundRequest</code></a>
object passed to the <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#dispatch-java.rmi.Remote-net.jini.jeri.InboundRequest-java.util.Collection-"><code>dispatch</code></a> method, was sent using
the protocol implemented by <code>BasicInvocationHandler</code>.
<p>A basic permission-based preinvocation access control mechanism is
provided. A permission class can be specified when an invocation
dispatcher is constructed; instances of that class are constructed using
either a <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect"><code>Method</code></a> instance or a <code>String</code> representing
the remote method being invoked. The class can have a constructor with a
<code>Method</code> parameter to permit an arbitrary mapping to the
actual permission target name and actions; otherwise, the class must
have a constructor taking the fully qualified name of the remote method
as a <code>String</code>. For each incoming call on a remote object, the
client subject must be granted the associated permission for that remote
method. (Access control for an individual remote method can effectively
be disabled by granting the associated permission to all protection
domains.) A simple subclass of <a href="../../../net/jini/security/AccessPermission.html" title="class in net.jini.security"><code>AccessPermission</code></a> is typically
used as the permission class.
<p>Other access control mechanisms can be implemented by subclassing this
class and overriding the various protected methods.
<p>This class is designed to support dispatching remote calls to the
<a href="../../../net/jini/security/proxytrust/ProxyTrust.html#getProxyVerifier--"><code>ProxyTrust.getProxyVerifier</code></a> method
to the local <a href="../../../net/jini/security/proxytrust/ServerProxyTrust.html#getProxyVerifier--"><code>ServerProxyTrust.getProxyVerifier</code></a> method of a remote object, to allow a
remote object to be exported in such a way that its proxy can be
directly trusted by clients as well as in such a way that its proxy can
be trusted by clients using <a href="../../../net/jini/security/proxytrust/ProxyTrustVerifier.html" title="class in net.jini.security.proxytrust"><code>ProxyTrustVerifier</code></a>.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Sun Microsystems, Inc.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../net/jini/jeri/BasicInvocationHandler.html" title="class in net.jini.jeri"><code>BasicInvocationHandler</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#BasicInvocationDispatcher-java.util.Collection-net.jini.jeri.ServerCapabilities-net.jini.core.constraint.MethodConstraints-java.lang.Class-java.lang.ClassLoader-">BasicInvocationDispatcher</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;methods,
<a href="../../../net/jini/jeri/ServerCapabilities.html" title="interface in net.jini.jeri">ServerCapabilities</a>&nbsp;serverCapabilities,
<a href="../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;serverConstraints,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&nbsp;permissionClass,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;loader)</code>
<div class="block">Creates an invocation dispatcher to receive incoming remote calls
for the specified methods, for a server and transport with the
specified capabilities, enforcing the specified constraints,
performing preinvocation access control using the specified
permission class (if any).</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#checkAccess-java.rmi.Remote-java.lang.reflect.Method-net.jini.core.constraint.InvocationConstraints-java.util.Collection-">checkAccess</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/Remote.html?is-external=true" title="class or interface in java.rmi">Remote</a>&nbsp;impl,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
<a href="../../../net/jini/core/constraint/InvocationConstraints.html" title="class in net.jini.core.constraint">InvocationConstraints</a>&nbsp;constraints,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)</code>
<div class="block">Checks that the client has permission to invoke the specified method on
the specified remote object.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#checkClientPermission-java.security.Permission-">checkClientPermission</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/security/Permission.html?is-external=true" title="class or interface in java.security">Permission</a>&nbsp;permission)</code>
<div class="block">Checks that the client subject for the current remote call has the
specified permission.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#checkPermissionClass-java.lang.Class-">checkPermissionClass</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&nbsp;permissionClass)</code>
<div class="block">Checks that the specified class is a valid permission class for use in
preinvocation access control.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectInputStream.html?is-external=true" title="class or interface in java.io">ObjectInputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#createMarshalInputStream-java.lang.Object-net.jini.jeri.InboundRequest-boolean-java.util.Collection-">createMarshalInputStream</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;impl,
<a href="../../../net/jini/jeri/InboundRequest.html" title="interface in net.jini.jeri">InboundRequest</a>&nbsp;request,
boolean&nbsp;integrity,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)</code>
<div class="block">Returns a new marshal input stream to use to read objects from the
request input stream obtained by invoking the <a href="../../../net/jini/jeri/InboundRequest.html#getRequestInputStream--"><code>getRequestInputStream</code></a> method
on the given <code>request</code>.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectOutputStream.html?is-external=true" title="class or interface in java.io">ObjectOutputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#createMarshalOutputStream-java.lang.Object-java.lang.reflect.Method-net.jini.jeri.InboundRequest-java.util.Collection-">createMarshalOutputStream</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;impl,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
<a href="../../../net/jini/jeri/InboundRequest.html" title="interface in net.jini.jeri">InboundRequest</a>&nbsp;request,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)</code>
<div class="block">Returns a new marshal output stream to use to write objects to the
response output stream obtained by invoking the <a href="../../../net/jini/jeri/InboundRequest.html#getResponseOutputStream--"><code>getResponseOutputStream</code></a>
method on the given <code>request</code>.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#dispatch-java.rmi.Remote-net.jini.jeri.InboundRequest-java.util.Collection-">dispatch</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/Remote.html?is-external=true" title="class or interface in java.rmi">Remote</a>&nbsp;impl,
<a href="../../../net/jini/jeri/InboundRequest.html" title="interface in net.jini.jeri">InboundRequest</a>&nbsp;request,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)</code>
<div class="block">Dispatches the specified inbound request to the specified remote object.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#getClassLoader--">getClassLoader</a></span>()</code>
<div class="block">Returns the class loader specified during construction.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#invoke-java.rmi.Remote-java.lang.reflect.Method-java.lang.Object:A-java.util.Collection-">invoke</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/Remote.html?is-external=true" title="class or interface in java.rmi">Remote</a>&nbsp;impl,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]&nbsp;args,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)</code>
<div class="block">Invokes the specified <code>method</code> on the specified remote
object <code>impl</code>, with the specified arguments.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#marshalReturn-java.rmi.Remote-java.lang.reflect.Method-java.lang.Object-java.io.ObjectOutputStream-java.util.Collection-">marshalReturn</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/Remote.html?is-external=true" title="class or interface in java.rmi">Remote</a>&nbsp;impl,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;returnValue,
<a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectOutputStream.html?is-external=true" title="class or interface in java.io">ObjectOutputStream</a>&nbsp;out,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)</code>
<div class="block">Marshals the specified return value for the specified remote method
to the marshal output stream, <code>out</code>.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#marshalThrow-java.rmi.Remote-java.lang.reflect.Method-java.lang.Throwable-java.io.ObjectOutputStream-java.util.Collection-">marshalThrow</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/Remote.html?is-external=true" title="class or interface in java.rmi">Remote</a>&nbsp;impl,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>&nbsp;throwable,
<a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectOutputStream.html?is-external=true" title="class or interface in java.io">ObjectOutputStream</a>&nbsp;out,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)</code>
<div class="block">Marshals the <code>throwable</code> for the specified remote method
to the marshal output stream, <code>out</code>.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#unmarshalArguments-java.rmi.Remote-java.lang.reflect.Method-java.io.ObjectInputStream-java.util.Collection-">unmarshalArguments</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/Remote.html?is-external=true" title="class or interface in java.rmi">Remote</a>&nbsp;impl,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
<a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectInputStream.html?is-external=true" title="class or interface in java.io">ObjectInputStream</a>&nbsp;in,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)</code>
<div class="block">Unmarshals the arguments for the specified remote <code>method</code>
from the specified marshal input stream, <code>in</code>, and returns an
<code>Object</code> array containing the arguments read.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#unmarshalMethod-java.rmi.Remote-java.io.ObjectInputStream-java.util.Collection-">unmarshalMethod</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/Remote.html?is-external=true" title="class or interface in java.rmi">Remote</a>&nbsp;impl,
<a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectInputStream.html?is-external=true" title="class or interface in java.io">ObjectInputStream</a>&nbsp;in,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)</code>
<div class="block">Unmarshals a method representation from the marshal input stream,
<code>in</code>, and returns the <code>Method</code> object
corresponding to that representation.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="BasicInvocationDispatcher-java.util.Collection-net.jini.jeri.ServerCapabilities-net.jini.core.constraint.MethodConstraints-java.lang.Class-java.lang.ClassLoader-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BasicInvocationDispatcher</h4>
<pre>public&nbsp;BasicInvocationDispatcher(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;methods,
<a href="../../../net/jini/jeri/ServerCapabilities.html" title="interface in net.jini.jeri">ServerCapabilities</a>&nbsp;serverCapabilities,
<a href="../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;serverConstraints,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&nbsp;permissionClass,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;loader)
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/ExportException.html?is-external=true" title="class or interface in java.rmi.server">ExportException</a></pre>
<div class="block">Creates an invocation dispatcher to receive incoming remote calls
for the specified methods, for a server and transport with the
specified capabilities, enforcing the specified constraints,
performing preinvocation access control using the specified
permission class (if any). The specified class loader is used by
the <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#createMarshalInputStream-java.lang.Object-net.jini.jeri.InboundRequest-boolean-java.util.Collection-"><code>createMarshalInputStream</code></a>
method.
<p>For each combination of constraints that might need to be
enforced (obtained by calling the <a href="../../../net/jini/core/constraint/MethodConstraints.html#possibleConstraints--"><code>possibleConstraints</code></a> method on
the specified server constraints, or using an empty constraints
instance if the specified server constraints instance is
<code>null</code>), calling the <a href="../../../net/jini/jeri/ServerCapabilities.html#checkConstraints-net.jini.core.constraint.InvocationConstraints-"><code>checkConstraints</code></a> method of the
specified capabilities object with those constraints must return
constraints containing at most an <a href="../../../net/jini/core/constraint/Integrity.html" title="class in net.jini.core.constraint"><code>Integrity</code></a> constraint as a
requirement, or an <code>ExportException</code> is thrown.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>methods</code> - a collection of <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect"><code>Method</code></a> instances for the
remote methods</dd>
<dd><code>serverCapabilities</code> - the transport capabilities of the server</dd>
<dd><code>serverConstraints</code> - the server constraints, or <code>null</code></dd>
<dd><code>permissionClass</code> - the permission class, or <code>null</code></dd>
<dd><code>loader</code> - the class loader, or <code>null</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code> - if the permission class is not
<code>null</code> and is in a named package and a
security manager exists and invoking its
<code>checkPackageAccess</code> method with the package
name of the permission class throws a
<code>SecurityException</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the permission class
is abstract, is not <code>public</code>, is not a subclass
of <a href="http://docs.oracle.com/javase/6/docs/api/java/security/Permission.html?is-external=true" title="class or interface in java.security"><code>Permission</code></a>, or does not have a public
constructor that has either one <code>String</code>
parameter or one <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect"><code>Method</code></a> parameter and has no
declared exceptions, or if any element of
<code>methods</code> is not a <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect"><code>Method</code></a> instance</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if <code>methods</code> or
<code>serverCapabilities</code> is <code>null</code>, or if
<code>methods</code> contains a <code>null</code> element</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/ExportException.html?is-external=true" title="class or interface in java.rmi.server">ExportException</a></code> - if any of the possible server constraints
cannot be satisfied according to the specified server
capabilities</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getClassLoader--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClassLoader</h4>
<pre>protected final&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;getClassLoader()</pre>
<div class="block">Returns the class loader specified during construction.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the class loader</dd>
</dl>
</li>
</ul>
<a name="checkPermissionClass-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkPermissionClass</h4>
<pre>public static&nbsp;void&nbsp;checkPermissionClass(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&nbsp;permissionClass)</pre>
<div class="block">Checks that the specified class is a valid permission class for use in
preinvocation access control.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>permissionClass</code> - the permission class, or <code>null</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the permission class is abstract,
is not a subclass of <a href="http://docs.oracle.com/javase/6/docs/api/java/security/Permission.html?is-external=true" title="class or interface in java.security"><code>Permission</code></a>, or does not have a public
constructor that has either one <code>String</code> parameter or one
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect"><code>Method</code></a> parameter and has no declared exceptions</dd>
</dl>
</li>
</ul>
<a name="dispatch-java.rmi.Remote-net.jini.jeri.InboundRequest-java.util.Collection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dispatch</h4>
<pre>public&nbsp;void&nbsp;dispatch(<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/Remote.html?is-external=true" title="class or interface in java.rmi">Remote</a>&nbsp;impl,
<a href="../../../net/jini/jeri/InboundRequest.html" title="interface in net.jini.jeri">InboundRequest</a>&nbsp;request,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)</pre>
<div class="block">Dispatches the specified inbound request to the specified remote object.
When used in conjunction with <a href="../../../net/jini/jeri/BasicJeriExporter.html" title="class in net.jini.jeri"><code>BasicJeriExporter</code></a>, this
method is called in a context that has the security context and
context class loader specified by
<a href="../../../net/jini/jeri/BasicJeriExporter.html#export-java.rmi.Remote-"><code>BasicJeriExporter.export</code></a>.
<p><code>BasicInvocationDispatcher</code> implements this method to
execute the following actions in order:
<ul>
<li>A byte specifying the marshal stream protocol version is read
from the request input stream of the inbound request. If any
exception is thrown when reading this byte, the inbound request is
aborted and this method returns. If the byte is not
<code>0x00</code>, two byte values of <code>0x00</code> (indicating
a marshal stream protocol version mismatch) are written to the
response output stream of the inbound request, the output stream is
closed, and this method returns.
<li>If the version byte is <code>0x00</code>, a second byte
specifying object integrity is read from the same stream. If any
exception is thrown when reading this byte, the inbound request is
aborted and this method returns. Object integrity will be enforced
if the value read is not <code>0x00</code>, but will not be enforced
if the value is <code>0x00</code>. An <a href="../../../net/jini/io/context/IntegrityEnforcement.html" title="interface in net.jini.io.context"><code>IntegrityEnforcement</code></a> element is then added to
the server context, reflecting whether or not object integrity is
being enforced.
<li>The <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#createMarshalInputStream-java.lang.Object-net.jini.jeri.InboundRequest-boolean-java.util.Collection-"><code>createMarshalInputStream</code></a>
method of this invocation dispatcher is called, passing the remote
object, the inbound request, a boolean indicating if object
integrity is being enforced, and the server context, to create the
marshal input stream for unmarshalling the request.
<li>The <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#unmarshalMethod-java.rmi.Remote-java.io.ObjectInputStream-java.util.Collection-"><code>unmarshalMethod</code></a> of this
invocation dispatcher is called with the remote object, the marshal
input stream, and the server context to obtain the remote method.
<li> The <a href="../../../net/jini/jeri/InboundRequest.html#checkConstraints-net.jini.core.constraint.InvocationConstraints-"><code>checkConstraints</code></a>
method of the inbound request is called with the constraints that
must be enforced for that remote method, obtained by passing the
remote method to the <a href="../../../net/jini/core/constraint/MethodConstraints.html#getConstraints-java.lang.reflect.Method-"><code>getConstraints</code></a> method of this invocation dispatcher's server
constraints, and adding <a href="../../../net/jini/core/constraint/Integrity.html#YES"><code>Integrity.YES</code></a> as a
requirement if object integrity is being enforced. If the
unfulfilled requirements returned by <code>checkConstraints</code>
contains a constraint that is not an instance of <a href="../../../net/jini/core/constraint/Integrity.html" title="class in net.jini.core.constraint"><code>Integrity</code></a>
or if integrity is not being enforced and the returned requirements
contains the element <code>Integrity.YES</code>, an
<code>UnsupportedConstraintException</code> is sent back to the
caller as described further below. Otherwise, the <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#checkAccess-java.rmi.Remote-java.lang.reflect.Method-net.jini.core.constraint.InvocationConstraints-java.util.Collection-"><code>checkAccess</code></a> method of this invocation dispatcher is
called with the remote object, the remote method, the enforced
constraints, and the server context.
<li>The method arguments are obtained by calling the <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#unmarshalArguments-java.rmi.Remote-java.lang.reflect.Method-java.io.ObjectInputStream-java.util.Collection-"><code>unmarshalArguments</code></a> method of this invocation
dispatcher with the remote object, the remote method, the marshal
input stream, and the server context.
<li>If any exception is thrown during this unmarshalling, that exception
is sent back to the caller as described further below; however, if the
exception is a checked exception (<a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io"><code>IOException</code></a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang"><code>ClassNotFoundException</code></a>, or <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NoSuchMethodException.html?is-external=true" title="class or interface in java.lang"><code>NoSuchMethodException</code></a>), the
exception is first wrapped in an <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/UnmarshalException.html?is-external=true" title="class or interface in java.rmi"><code>UnmarshalException</code></a> and the
wrapped exception is sent back.
<li>Otherwise, if unmarshalling is successful, the <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#invoke-java.rmi.Remote-java.lang.reflect.Method-java.lang.Object:A-java.util.Collection-"><code>invoke</code></a> method of this invocation dispatcher is then called with the
remote object, the remote method, the arguments returned by
<code>unmarshalArguments</code>, and the server context. If
<code>invoke</code> throws an exception, that exception is sent back
to the caller as described further below.
<li>The input stream is closed whether or not an exception was
thrown unmarshalling the arguments or invoking the method.
<li>If <code>invoke</code> returns normally, a byte value of
<code>0x01</code> is written to the response output stream of the
inbound request. Then the <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#createMarshalOutputStream-java.lang.Object-java.lang.reflect.Method-net.jini.jeri.InboundRequest-java.util.Collection-"><code>createMarshalOutputStream</code></a> method of this invocation dispatcher is
called, passing the remote object, the remote method, the inbound
request, and the server context, to create the marshal output stream
for marshalling the response. Then the <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#marshalReturn-java.rmi.Remote-java.lang.reflect.Method-java.lang.Object-java.io.ObjectOutputStream-java.util.Collection-"><code>marshalReturn</code></a> method of this invocation dispatcher is called with
the remote object, the remote method, the value returned by
<code>invoke</code>, the marshal output stream, and the server
context. Then the marshal output stream is closed. Any exception
thrown during this marshalling is ignored.
<li>When an exception is sent back to the caller, a byte value of
<code>0x02</code> is written to the response output stream of the
inbound request. Then a marshal output stream is created by calling
the <code>createMarshalOutputStream</code> method as described above
(but with a <code>null</code> remote method if one was not
successfully unmarshalled). Then the <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#marshalThrow-java.rmi.Remote-java.lang.reflect.Method-java.lang.Throwable-java.io.ObjectOutputStream-java.util.Collection-"><code>marshalThrow</code></a> method of this invocation dispatcher is called with
the remote object, the remote method (or <code>null</code> if one
was not successfully unmarshalled), the exception, the marshal
output stream, and the server context. Then the marshal output
stream is closed. Any exception thrown during this marshalling is
ignored. If the exception being sent back is a
<code>RemoteException</code>, it is wrapped in a <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/ServerException.html?is-external=true" title="class or interface in java.rmi"><code>ServerException</code></a> and the wrapped exception is passed to
<code>marshalThrow</code>. If the exception being sent back is an
<code>Error</code>, it is wrapped in a <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/ServerError.html?is-external=true" title="class or interface in java.rmi"><code>ServerError</code></a> and the
wrapped exception is passed to <code>marshalThrow</code>. If the
exception being sent back occurred before or during the call to
<code>unmarshalMethod</code>, then the remote method passed to
<code>marshalThrow</code> is <code>null</code>.
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../net/jini/jeri/InvocationDispatcher.html#dispatch-java.rmi.Remote-net.jini.jeri.InboundRequest-java.util.Collection-">dispatch</a></code>&nbsp;in interface&nbsp;<code><a href="../../../net/jini/jeri/InvocationDispatcher.html" title="interface in net.jini.jeri">InvocationDispatcher</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>impl</code> - a remote object</dd>
<dd><code>request</code> - inbound request object for reading arguments and
writing the result</dd>
<dd><code>context</code> - a modifiable server context collection</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if any argument is <code>null</code></dd>
</dl>
</li>
</ul>
<a name="createMarshalInputStream-java.lang.Object-net.jini.jeri.InboundRequest-boolean-java.util.Collection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createMarshalInputStream</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectInputStream.html?is-external=true" title="class or interface in java.io">ObjectInputStream</a>&nbsp;createMarshalInputStream(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;impl,
<a href="../../../net/jini/jeri/InboundRequest.html" title="interface in net.jini.jeri">InboundRequest</a>&nbsp;request,
boolean&nbsp;integrity,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Returns a new marshal input stream to use to read objects from the
request input stream obtained by invoking the <a href="../../../net/jini/jeri/InboundRequest.html#getRequestInputStream--"><code>getRequestInputStream</code></a> method
on the given <code>request</code>.
<p><code>BasicInvocationDispatcher</code> implements this method as
follows:
<p>First, a class loader is selected to use as the
<code>defaultLoader</code> and the <code>verifierLoader</code> for
the marshal input stream instance. If the class loader specified at
construction is not <code>null</code>, the selected loader is that
loader. Otherwise, if a security manager exists, its <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/SecurityManager.html?is-external=true#checkPermission-java.security.Permission-" title="class or interface in java.lang"><code>checkPermission</code></a> method is invoked
with the permission <code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/RuntimePermission.html?is-external=true" title="class or interface in java.lang"><code>RuntimePermission</code></a>("getClassLoader")</code>; this invocation may
throw a <code>SecurityException</code>. If the above security check
succeeds, the selected loader is the class loader of
<code>impl</code>'s class.
<p>This method returns a new <a href="../../../net/jini/io/MarshalInputStream.html" title="class in net.jini.io"><code>MarshalInputStream</code></a> instance
constructed with the input stream (obtained from the
<code>request</code> as specified above) for the input stream
<code>in</code>, the selected loader for <code>defaultLoader</code>
and <code>verifierLoader</code>, the boolean <code>integrity</code>
for <code>verifyCodebaseIntegrity</code>, and an unmodifiable view
of <code>context</code> for the <code>context</code> collection.
The <a href="../../../net/jini/io/MarshalInputStream.html#useCodebaseAnnotations--"><code>useCodebaseAnnotations</code></a> method is invoked on the created stream
before it is returned.
<p>A subclass can override this method to control how the marshal input
stream is created or implemented.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>impl</code> - the remote object</dd>
<dd><code>request</code> - the inbound request</dd>
<dd><code>integrity</code> - <code>true</code> if object integrity is being
enforced for the remote call, and <code>false</code> otherwise</dd>
<dd><code>context</code> - the server context</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new marshal input stream for unmarshalling a call request</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if any argument is <code>null</code></dd>
</dl>
</li>
</ul>
<a name="createMarshalOutputStream-java.lang.Object-java.lang.reflect.Method-net.jini.jeri.InboundRequest-java.util.Collection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createMarshalOutputStream</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectOutputStream.html?is-external=true" title="class or interface in java.io">ObjectOutputStream</a>&nbsp;createMarshalOutputStream(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;impl,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
<a href="../../../net/jini/jeri/InboundRequest.html" title="interface in net.jini.jeri">InboundRequest</a>&nbsp;request,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Returns a new marshal output stream to use to write objects to the
response output stream obtained by invoking the <a href="../../../net/jini/jeri/InboundRequest.html#getResponseOutputStream--"><code>getResponseOutputStream</code></a>
method on the given <code>request</code>.
<p>This method will be called with a <code>null</code>
<code>method</code> argument if an <code>IOException</code> occurred
when reading method information from the incoming call stream.
<p><code>BasicInvocationDispatcher</code> implements this method to
return a new <a href="../../../net/jini/io/MarshalOutputStream.html" title="class in net.jini.io"><code>MarshalOutputStream</code></a> instance constructed with
the output stream obtained from the <code>request</code> as
specified above and an unmodifiable view of the given
<code>context</code> collection.
<p>A subclass can override this method to control how the marshal output
stream is created or implemented.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>impl</code> - the remote object</dd>
<dd><code>method</code> - the possibly-<code>null</code> <code>Method</code>
instance corresponding to the interface method invoked on
the remote object</dd>
<dd><code>request</code> - the inbound request</dd>
<dd><code>context</code> - the server context</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new marshal output stream for marshalling a call response</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if <code>impl</code>,
<code>request</code>, or <code>context</code> is
<code>null</code></dd>
</dl>
</li>
</ul>
<a name="checkAccess-java.rmi.Remote-java.lang.reflect.Method-net.jini.core.constraint.InvocationConstraints-java.util.Collection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkAccess</h4>
<pre>protected&nbsp;void&nbsp;checkAccess(<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/Remote.html?is-external=true" title="class or interface in java.rmi">Remote</a>&nbsp;impl,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
<a href="../../../net/jini/core/constraint/InvocationConstraints.html" title="class in net.jini.core.constraint">InvocationConstraints</a>&nbsp;constraints,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)</pre>
<div class="block">Checks that the client has permission to invoke the specified method on
the specified remote object.
<p><code>BasicInvocationDispatcher</code> implements this method as
follows:
<p>If a permission class was specified when this invocation
dispatcher was constructed, <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#checkClientPermission-java.security.Permission-"><code>checkClientPermission</code></a> is called with a permission constructed from
the permission class. If the permission class has a constructor with
a <code>Method</code> parameter, the permission is constructed by
passing the specified method to that constructor. Otherwise the
permission is constructed by passing the fully qualified name of the
method to the constructor with a <code>String</code> parameter,
where the argument is formed by concatenating the name of the
declaring class of the specified method and the name of the method,
separated by ".".
<p>A subclass can override this method to implement other preinvocation
access control mechanisms.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>impl</code> - the remote object</dd>
<dd><code>method</code> - the remote method</dd>
<dd><code>constraints</code> - the enforced constraints for the specified
method, or <code>null</code></dd>
<dd><code>context</code> - the server context</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code> - if the current client subject does not
have permission to invoke the method</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the current thread is not executing an
incoming remote call for a remote object</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if <code>impl</code>,
<code>method</code>, or <code>context</code> is
<code>null</code></dd>
</dl>
</li>
</ul>
<a name="checkClientPermission-java.security.Permission-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkClientPermission</h4>
<pre>public static&nbsp;void&nbsp;checkClientPermission(<a href="http://docs.oracle.com/javase/6/docs/api/java/security/Permission.html?is-external=true" title="class or interface in java.security">Permission</a>&nbsp;permission)</pre>
<div class="block">Checks that the client subject for the current remote call has the
specified permission. The client subject is obtained by calling <a href="../../../net/jini/export/ServerContext.html#getServerContextElement-java.lang.Class-"><code>ServerContext.getServerContextElement</code></a>, passing the class <a href="../../../net/jini/io/context/ClientSubject.html" title="interface in net.jini.io.context"><code>ClientSubject</code></a>, and then calling the <a href="../../../net/jini/io/context/ClientSubject.html#getClientSubject--"><code>getClientSubject</code></a> method of the returned
element (if any). If a security manager is installed, a <a href="http://docs.oracle.com/javase/6/docs/api/java/security/ProtectionDomain.html?is-external=true" title="class or interface in java.security"><code>ProtectionDomain</code></a> is constructed with an empty <a href="http://docs.oracle.com/javase/6/docs/api/java/security/CodeSource.html?is-external=true" title="class or interface in java.security"><code>CodeSource</code></a>
(<code>null</code> location and certificates), <code>null</code>
permissions, <code>null</code> class loader, and the principals from
the client subject (if any), and the <code>implies</code> method of
that protection domain is invoked with the specified permission. If
<code>true</code> is returned, this method returns normally, otherwise
a <code>SecurityException</code> is thrown. If no security
manager is installed, this method returns normally.
<p>Note that the permission grant required to satisfy this check must
be to the client's principals alone (or a subset thereof); it cannot be
qualified by what code is being executed. At the point in a remote call
where this method is intended to be used, the useful "call stack" only
exists at the other end of the remote call (on the client side), and so
cannot meaningfully enter into the access control decision.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>permission</code> - the requested permission</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code> - if the current client subject has not
been granted the specified permission</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the current thread is not executing
an incoming remote method for a remote object</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if <code>permission</code> is
<code>null</code></dd>
</dl>
</li>
</ul>
<a name="unmarshalMethod-java.rmi.Remote-java.io.ObjectInputStream-java.util.Collection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unmarshalMethod</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;unmarshalMethod(<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/Remote.html?is-external=true" title="class or interface in java.rmi">Remote</a>&nbsp;impl,
<a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectInputStream.html?is-external=true" title="class or interface in java.io">ObjectInputStream</a>&nbsp;in,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NoSuchMethodException.html?is-external=true" title="class or interface in java.lang">NoSuchMethodException</a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></pre>
<div class="block">Unmarshals a method representation from the marshal input stream,
<code>in</code>, and returns the <code>Method</code> object
corresponding to that representation. For each remote call, the
<code>dispatch</code> method calls this method to unmarshal the
method representation.
<p><code>BasicInvocationDispatcher</code> implements this method to
call the <code>readLong</code> method on the marshal input stream to
read the method's representation encoded as a JRMP method hash
(defined in section 8.3 of the Java(TM) Remote Method Invocation
(Java RMI) specification) and return its
corresponding <code>Method</code> object chosen from the collection
of methods passed to the constructor of this invocation dispatcher.
If more than one method has the same hash, it is arbitrary as to
which one is returned.
<p>A subclass can override this method to control how the remote
method is unmarshalled.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>impl</code> - the remote object</dd>
<dd><code>in</code> - the marshal input stream for the remote call</dd>
<dd><code>context</code> - the server context passed to the <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#dispatch-java.rmi.Remote-net.jini.jeri.InboundRequest-java.util.Collection-"><code>dispatch</code></a> method for the remote call being processed</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>Method</code> object corresponding to the method
representation</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NoSuchMethodException.html?is-external=true" title="class or interface in java.lang">NoSuchMethodException</a></code> - if the method representation does not
correspond to a valid method</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></code> - if a class could not be found during
unmarshalling</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if any argument is <code>null</code></dd>
</dl>
</li>
</ul>
<a name="unmarshalArguments-java.rmi.Remote-java.lang.reflect.Method-java.io.ObjectInputStream-java.util.Collection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unmarshalArguments</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]&nbsp;unmarshalArguments(<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/Remote.html?is-external=true" title="class or interface in java.rmi">Remote</a>&nbsp;impl,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
<a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectInputStream.html?is-external=true" title="class or interface in java.io">ObjectInputStream</a>&nbsp;in,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></pre>
<div class="block">Unmarshals the arguments for the specified remote <code>method</code>
from the specified marshal input stream, <code>in</code>, and returns an
<code>Object</code> array containing the arguments read. For each
remote call, the <code>dispatch</code> method calls this method to
unmarshal arguments.
<p><code>BasicInvocationDispatcher</code> implements this method to
unmarshal each argument as follows:
<p>If the corresponding declared parameter type is primitive, then
the primitive value is read from the stream using the
corresponding <code>read</code> method for that primitive type (for
example, if the type is <code>int.class</code>, then the primitive
<code>int</code> value is read to the stream using the
<code>readInt</code> method) and the value is wrapped in the
corresponding primitive wrapper class for that type (e.g.,
<code>Integer</code> for <code>int</code>, etc.). Otherwise, the
argument is read from the stream using the <code>readObject</code>
method and returned as is.
<p>A subclass can override this method to unmarshal the arguments in an
alternative context, perform post-processing on the arguments,
unmarshal additional implicit data, or otherwise control how the
arguments are unmarshalled. In general, the context used should mirror
the context in which the arguments are manipulated in the
implementation of the remote object.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>impl</code> - the remote object</dd>
<dd><code>method</code> - the <code>Method</code> instance corresponding
to the interface method invoked on the remote object</dd>
<dd><code>in</code> - the incoming request stream for the remote call</dd>
<dd><code>context</code> - the server context passed to the <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#dispatch-java.rmi.Remote-net.jini.jeri.InboundRequest-java.util.Collection-"><code>dispatch</code></a> method for the remote call being processed</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an <code>Object</code> array containing
the unmarshalled arguments. If an argument's corresponding
declared parameter type is primitive, then its value is
represented with an instance of the corresponding primitive
wrapper class; otherwise, the value for that argument is an
object of a class assignable to the declared parameter type.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></code> - if a class could not be found during
unmarshalling</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if any argument is <code>null</code></dd>
</dl>
</li>
</ul>
<a name="invoke-java.rmi.Remote-java.lang.reflect.Method-java.lang.Object:A-java.util.Collection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>invoke</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;invoke(<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/Remote.html?is-external=true" title="class or interface in java.rmi">Remote</a>&nbsp;impl,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]&nbsp;args,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a></pre>
<div class="block">Invokes the specified <code>method</code> on the specified remote
object <code>impl</code>, with the specified arguments.
If the invocation completes normally, the return value will be
returned by this method. If the invocation throws an exception,
this method will throw the same exception.
<p><code>BasicInvocationDispatcher</code> implements this method as
follows:
<p>If the specified method is not set accessible or is not a
<code>public</code> method of a <code>public</code> class an
<code>IllegalArgumentException</code> is thrown.
<p>If the specified method is <a href="../../../net/jini/security/proxytrust/ProxyTrust.html#getProxyVerifier--"><code>ProxyTrust.getProxyVerifier</code></a> and the remote object is an instance of
<a href="../../../net/jini/security/proxytrust/ServerProxyTrust.html" title="interface in net.jini.security.proxytrust"><code>ServerProxyTrust</code></a>, the <a href="../../../net/jini/security/proxytrust/ServerProxyTrust.html#getProxyVerifier--"><code>getProxyVerifier</code></a> method of the remote object is called and the result
is returned.
<p>Otherwise, the specified method's <code>invoke</code> method is
called with the specified remote object and the specified arguments,
and the result is returned. If <code>invoke</code> throws an <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/InvocationTargetException.html?is-external=true" title="class or interface in java.lang.reflect"><code>InvocationTargetException</code></a>, that exception is caught and the target
exception inside it is thrown to the caller. Any other exception
thrown during any of this computation is thrown to the caller.
<p>A subclass can override this method to invoke the method in an
alternative context, perform pre- or post-processing, or otherwise
control how the method is invoked.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>impl</code> - the remote object</dd>
<dd><code>method</code> - the <code>Method</code> instance corresponding
to the interface method invoked on the remote object</dd>
<dd><code>args</code> - the method arguments</dd>
<dd><code>context</code> - the server context passed to the <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#dispatch-java.rmi.Remote-net.jini.jeri.InboundRequest-java.util.Collection-"><code>dispatch</code></a> method for the remote call being processed</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the result of the method invocation on <code>impl</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if any argument is <code>null</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a></code> - the exception thrown from the method invocation
on <code>impl</code></dd>
</dl>
</li>
</ul>
<a name="marshalReturn-java.rmi.Remote-java.lang.reflect.Method-java.lang.Object-java.io.ObjectOutputStream-java.util.Collection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>marshalReturn</h4>
<pre>protected&nbsp;void&nbsp;marshalReturn(<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/Remote.html?is-external=true" title="class or interface in java.rmi">Remote</a>&nbsp;impl,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;returnValue,
<a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectOutputStream.html?is-external=true" title="class or interface in java.io">ObjectOutputStream</a>&nbsp;out,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Marshals the specified return value for the specified remote method
to the marshal output stream, <code>out</code>. After invoking
the method on the remote object <code>impl</code>, the
<code>dispatch</code> method calls this method to marshal the value
returned from the invocation on that remote object.
<p><code>BasicInvocationDispatcher</code> implements this method as
follows:
<p>If the declared return type of the method is void, then no return
value is written to the stream. If the return type is a primitive
type, then the primitive value is written to the stream (for
example, if the type is <code>int.class</code>, then the primitive
<code>int</code> value is written to the stream using the
<code>writeInt</code> method). Otherwise, the return value is
written to the stream using the <code>writeObject</code> method.
<p>A subclass can override this method to marshal the return value in an
alternative context, perform pre- or post-processing on the return
value, marshal additional implicit data, or otherwise control how the
return value is marshalled. In general, the context used should mirror
the context in which the result is computed in the implementation of
the remote object.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>impl</code> - the remote object</dd>
<dd><code>method</code> - the <code>Method</code> instance corresponding
to the interface method invoked on the remote object</dd>
<dd><code>returnValue</code> - the return value to marshal to the stream</dd>
<dd><code>out</code> - the marshal output stream</dd>
<dd><code>context</code> - the server context passed to the <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#dispatch-java.rmi.Remote-net.jini.jeri.InboundRequest-java.util.Collection-"><code>dispatch</code></a> method for the remote call being processed</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if <code>impl</code>,
<code>method</code>, <code>out</code>, or
<code>context</code> is <code>null</code></dd>
</dl>
</li>
</ul>
<a name="marshalThrow-java.rmi.Remote-java.lang.reflect.Method-java.lang.Throwable-java.io.ObjectOutputStream-java.util.Collection-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>marshalThrow</h4>
<pre>protected&nbsp;void&nbsp;marshalThrow(<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/Remote.html?is-external=true" title="class or interface in java.rmi">Remote</a>&nbsp;impl,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>&nbsp;throwable,
<a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectOutputStream.html?is-external=true" title="class or interface in java.io">ObjectOutputStream</a>&nbsp;out,
<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;context)
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Marshals the <code>throwable</code> for the specified remote method
to the marshal output stream, <code>out</code>. For each method
invocation on <code>impl</code> that throws an exception, this
method is called to marshal the throwable. This method is also
called if an exception occurs reading the method information from
the incoming call stream, as a result of calling <a href="../../../net/jini/jeri/BasicInvocationDispatcher.html#unmarshalMethod-java.rmi.Remote-java.io.ObjectInputStream-java.util.Collection-"><code>unmarshalMethod</code></a>; in this case, the
<code>Method</code> instance will be <code>null</code>.
<p><code>BasicInvocationDispatcher</code> implements this method to
marshal the throwable to the stream using the
<code>writeObject</code> method.
<p>A subclass can override this method to marshal the throwable in an
alternative context, perform pre- or post-processing on the throwable,
marshal additional implicit data, or otherwise control how the throwable
is marshalled. In general, the context used should mirror the context
in which the exception is generated in the implementation of the
remote object.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>impl</code> - the remote object</dd>
<dd><code>method</code> - the possibly-<code>null</code> <code>Method</code>
instance corresponding to the interface method invoked on
the remote object</dd>
<dd><code>throwable</code> - a throwable to marshal to the stream</dd>
<dd><code>out</code> - the marshal output stream</dd>
<dd><code>context</code> - the server context</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if <code>impl</code>,
<code>throwable</code>, <code>out</code>, or
<code>context</code> is <code>null</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= 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><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/BasicInvocationDispatcher.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/jeri/BasicILFactory.html" title="class in net.jini.jeri"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../net/jini/jeri/BasicInvocationHandler.html" title="class in net.jini.jeri"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?net/jini/jeri/BasicInvocationDispatcher.html" target="_top">Frames</a></li>
<li><a href="BasicInvocationDispatcher.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;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>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>