<!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:44 EST 2016 --> | |
<title>ClassLoading (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="ClassLoading (Apache River v3.0.0 Specification-only API Documentation)"; | |
} | |
} | |
catch(err) { | |
} | |
//--> | |
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9}; | |
var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/ClassLoading.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/loader/ClassAnnotation.html" title="interface in net.jini.loader"><span class="typeNameLink">Prev Class</span></a></li> | |
<li><a href="../../../net/jini/loader/DownloadPermission.html" title="class in net.jini.loader"><span class="typeNameLink">Next Class</span></a></li> | |
</ul> | |
<ul class="navList"> | |
<li><a href="../../../index.html?net/jini/loader/ClassLoading.html" target="_top">Frames</a></li> | |
<li><a href="ClassLoading.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> | |
<div> | |
<ul class="subNavList"> | |
<li>Summary: </li> | |
<li>Nested | </li> | |
<li>Field | </li> | |
<li>Constr | </li> | |
<li><a href="#method.summary">Method</a></li> | |
</ul> | |
<ul class="subNavList"> | |
<li>Detail: </li> | |
<li>Field | </li> | |
<li>Constr | </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.loader</div> | |
<h2 title="Class ClassLoading" class="title">Class ClassLoading</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.loader.ClassLoading</li> | |
</ul> | |
</li> | |
</ul> | |
<div class="description"> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<hr> | |
<br> | |
<pre>public final class <span class="typeNameLabel">ClassLoading</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></pre> | |
<div class="block">Provides static methods for loading classes using <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi</code></a> with optional verification that the codebase URIs | |
used to load classes provide content integrity (see <a href="../../../net/jini/security/Security.html#verifyCodebaseIntegrity-java.lang.String-java.lang.ClassLoader-"><code>Security.verifyCodebaseIntegrity</code></a>). | |
<p> | |
Traditionally a class extending <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi</code></a> is determined by setting | |
the system property "java.rmi.server.RMIClassLoaderSpi", or alternatively, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi</code></a> may also be defined by <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoader.html?is-external=true" title="class or interface in java.rmi.server"><code>RMIClassLoader</code></a> | |
using a provider visible to the <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang"><code>ClassLoader</code></a> returned by | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true#getSystemClassLoader--" title="class or interface in java.lang"><code>ClassLoader.getSystemClassLoader()</code></a> with <a href="http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html?is-external=true" title="class or interface in java.util"><code>ServiceLoader</code></a>. | |
</p><p> | |
As explained in River-336 this isn't always practical for IDE's or other | |
frameworks. To solve River-336, ClassLoading now uses <a href="http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html?is-external=true" title="class or interface in java.util"><code>ServiceLoader</code></a> | |
to determine a <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi</code></a> provider, however unlike | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoader.html?is-external=true" title="class or interface in java.rmi.server"><code>RMIClassLoader</code></a>, by default it uses ClassLoading's <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true#getResources-java.lang.String-" title="class or interface in java.lang"><code>ClassLoader.getResources(java.lang.String)</code></a> | |
instance to find providers. | |
</p><p> | |
To define a new RMIClassLoaderSpi for River to utilize, create a file in | |
your providers jar file called: | |
</p><p> | |
META-INF/services/java.rmi.server.RMIClassLoaderSpi | |
</p><p> | |
This file should contain a single line with the fully qualified name of | |
your RMIClassLoaderSpi implementation. | |
</p><p> | |
ClassLoading will iterate through all RMIClassLoaderSpi implementations found | |
until it finds one defined by the system property: | |
</p><p> | |
System.getProperty("net.jini.loader.ClassLoading.provider"); | |
</p><p> | |
If this System property is not defined, ClassLoading will load | |
<code>net.jini.loader.pref.PreferredClassProvider</code>, alternatively | |
<code>java.rmi.server.RMIClassLoader</code> delegates all calls to <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoader.html?is-external=true" title="class or interface in java.rmi.server"><code>RMIClassLoader</code></a>. | |
</p><p> | |
If a provider is not found, it will not be updated. | |
</p><p> | |
<h1>History</h1> | |
<p>Gregg Wonderly originally reported River-336 and provided a patch | |
containing a new CodebaseAccessClassLoader to replace <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoader.html?is-external=true" title="class or interface in java.rmi.server"><code>RMIClassLoader</code></a>, | |
later Sim Isjkes created RiverClassLoader that utilized ServiceLoader. | |
Both implementations contained methods identical to <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi</code></a>, | |
however new implementations were required to extend new provider | |
implementations, creating a compatibility issue with existing implementations | |
extending <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi</code></a>. For backward compatibility with existing | |
implementations, <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi</code></a> has been retained as the provider, | |
avoiding the need to recompile client code. The abilities of both | |
implementations, to use ServiceLoader, or to define a provider using a method | |
call have been retained, with the restriction that implementations are to be | |
obtained via ServiceLoader. | |
</p><p> | |
Instead, all that is required for utilization of existing service provider | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi</code></a> implementations is to set the system property | |
"net.jini.loader.ClassLoading.provider". | |
</p></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> | |
</dl> | |
</li> | |
</ul> | |
</div> | |
<div class="summary"> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<!-- ========== 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"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </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>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/loader/ClassLoading.html#getClassAnnotation-java.lang.Class-">getClassAnnotation</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><?> cl)</code> | |
<div class="block">Returns the annotation string (representing a location for | |
the class definition as a single or space delimited list of | |
RFC3986 compliant URI) that JERI will use to annotate the class | |
descriptor when marshalling objects of the given class.</div> | |
</td> | |
</tr> | |
<tr id="i1" class="rowColor"> | |
<td class="colFirst"><code>static <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/loader/ClassLoading.html#getClassLoader-java.lang.String-">getClassLoader</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> codebase)</code> | |
<div class="block">Returns a class loader that loads classes from the given codebase | |
RFC3986 compliant URI path.</div> | |
</td> | |
</tr> | |
<tr id="i2" class="altColor"> | |
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true" title="class or interface in java.rmi.server">RMIClassLoaderSpi</a></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/loader/ClassLoading.html#getProvider--">getProvider</a></span>()</code> | |
<div class="block">The current RMIClassLoaderSpi provider in use by ClassLoading.</div> | |
</td> | |
</tr> | |
<tr id="i3" class="rowColor"> | |
<td class="colFirst"><code>static boolean</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/loader/ClassLoading.html#installNewProvider-java.lang.String-java.lang.ClassLoader-">installNewProvider</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> providerName, | |
<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> providerLoader)</code> | |
<div class="block">Installs a new RMIClassLoaderSpi provider with the ClassLoader | |
provided.</div> | |
</td> | |
</tr> | |
<tr id="i4" class="altColor"> | |
<td class="colFirst"><code>static <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><?></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/loader/ClassLoading.html#loadClass-java.lang.String-java.lang.String-java.lang.ClassLoader-boolean-java.lang.ClassLoader-">loadClass</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> codebase, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, | |
<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> defaultLoader, | |
boolean verifyCodebaseIntegrity, | |
<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> verifierLoader)</code> | |
<div class="block">Loads a class using <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true#loadClass-java.lang.String-java.lang.String-java.lang.ClassLoader-" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi.loadClass(String,String,ClassLoader)</code></a>, | |
optionally verifying that the RFC3986 compliant | |
codebase URIs provide content integrity.</div> | |
</td> | |
</tr> | |
<tr id="i5" class="rowColor"> | |
<td class="colFirst"><code>static <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><?></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/loader/ClassLoading.html#loadProxyClass-java.lang.String-java.lang.String:A-java.lang.ClassLoader-boolean-java.lang.ClassLoader-">loadProxyClass</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> codebase, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] interfaceNames, | |
<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> defaultLoader, | |
boolean verifyCodebaseIntegrity, | |
<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> verifierLoader)</code> | |
<div class="block">Loads a dynamic proxy class using <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true#loadProxyClass-java.lang.String-java.lang.String:A-java.lang.ClassLoader-" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi.loadProxyClass(String,String[],ClassLoader)</code></a>, | |
optionally verifying that the RFC3986 compliant | |
codebase URIs provide content integrity.</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 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"> | |
<!-- ============ METHOD DETAIL ========== --> | |
<ul class="blockList"> | |
<li class="blockList"><a name="method.detail"> | |
<!-- --> | |
</a> | |
<h3>Method Detail</h3> | |
<a name="getProvider--"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>getProvider</h4> | |
<pre>public static <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true" title="class or interface in java.rmi.server">RMIClassLoaderSpi</a> getProvider()</pre> | |
<div class="block">The current RMIClassLoaderSpi provider in use by ClassLoading.</div> | |
<dl> | |
<dt><span class="returnLabel">Returns:</span></dt> | |
<dd>currently installed Provider, may be null.</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 caller doesn't have RuntimePermission "getFactory"</dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="installNewProvider-java.lang.String-java.lang.ClassLoader-"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>installNewProvider</h4> | |
<pre>public static boolean installNewProvider(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> providerName, | |
<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> providerLoader)</pre> | |
<div class="block">Installs a new RMIClassLoaderSpi provider with the ClassLoader | |
provided.</div> | |
<dl> | |
<dt><span class="paramLabel">Parameters:</span></dt> | |
<dd><code>providerName</code> - fully defined class name of the provider, if null, | |
a new provider instance will be determined by system properties.</dd> | |
<dd><code>providerLoader</code> - The class loader to be used to load | |
provider-configuration files and provider classes, or null if the | |
system class loader (or, failing that, the bootstrap class loader) | |
is to be used.</dd> | |
<dt><span class="returnLabel">Returns:</span></dt> | |
<dd>true if successful.</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 caller doesn't have RuntimePermission "getFactory"</dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="getClassLoader-java.lang.String-"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>getClassLoader</h4> | |
<pre>public static <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> getClassLoader(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> codebase) | |
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</a>, | |
<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></pre> | |
<div class="block">Returns a class loader that loads classes from the given codebase | |
RFC3986 compliant URI path. | |
<p>This method delegates to the | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true#getClassLoader-java.lang.String-" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi.getClassLoader(String)</code></a> method | |
of the provider instance, passing <code>codebase</code> as the argument. | |
<p>If there is a security manger, its <code>checkPermission</code> | |
method will be invoked with a | |
<code>RuntimePermission("getClassLoader")</code> permission; | |
this could result in a <code>SecurityException</code>. | |
The provider implementation of this method may also perform further | |
security checks to verify that the calling context has permission to | |
connect to all of the URIs in the codebase URI path.</div> | |
<dl> | |
<dt><span class="paramLabel">Parameters:</span></dt> | |
<dd><code>codebase</code> - the list of URIs (space-separated) from which | |
the returned class loader will load classes from, or <code>null</code></dd> | |
<dt><span class="returnLabel">Returns:</span></dt> | |
<dd>a class loader that loads classes from the given codebase URI | |
path</dd> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</a></code> - if <code>codebase</code> is | |
non-<code>null</code> and contains an non RFC3986 compliant URI, or | |
if <code>codebase</code> is <code>null</code> and a provider-specific | |
URL used to identify the class loader is invalid</dd> | |
<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 there is a security manager and the | |
invocation of its <code>checkPermission</code> method fails, or | |
if the caller does not have permission to connect to all of the | |
URIs in the codebase URI path</dd> | |
<dt><span class="simpleTagLabel">Since:</span></dt> | |
<dd>3.0</dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="getClassAnnotation-java.lang.Class-"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>getClassAnnotation</h4> | |
<pre>public static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getClassAnnotation(<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><?> cl)</pre> | |
<div class="block">Returns the annotation string (representing a location for | |
the class definition as a single or space delimited list of | |
RFC3986 compliant URI) that JERI will use to annotate the class | |
descriptor when marshalling objects of the given class. | |
<p>This method delegates to the | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true#getClassAnnotation-java.lang.Class-" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi.getClassAnnotation(Class)</code></a> method | |
of the provider instance, passing <code>cl</code> as the argument.</div> | |
<dl> | |
<dt><span class="paramLabel">Parameters:</span></dt> | |
<dd><code>cl</code> - the class to obtain the annotation for</dd> | |
<dt><span class="returnLabel">Returns:</span></dt> | |
<dd>a string to be used to annotate the given class when | |
it gets marshalled, 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/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if <code>cl</code> is <code>null</code></dd> | |
<dt><span class="simpleTagLabel">Since:</span></dt> | |
<dd>3.0</dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="loadClass-java.lang.String-java.lang.String-java.lang.ClassLoader-boolean-java.lang.ClassLoader-"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>loadClass</h4> | |
<pre>public static <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><?> loadClass(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> codebase, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, | |
<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> defaultLoader, | |
boolean verifyCodebaseIntegrity, | |
<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> verifierLoader) | |
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</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">Loads a class using <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true#loadClass-java.lang.String-java.lang.String-java.lang.ClassLoader-" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi.loadClass(String,String,ClassLoader)</code></a>, | |
optionally verifying that the RFC3986 compliant | |
codebase URIs provide content integrity. | |
<p>If <code>verifyCodebaseIntegrity</code> is <code>true</code> | |
and <code>codebase</code> is not <code>null</code>, then this | |
method invokes <a href="../../../net/jini/security/Security.html#verifyCodebaseIntegrity-java.lang.String-java.lang.ClassLoader-"><code>Security.verifyCodebaseIntegrity</code></a> with <code>codebase</code> as | |
the first argument and <code>verifierLoader</code> as the | |
second argument (this invocation may be skipped if a previous | |
invocation of this method or <a href="../../../net/jini/loader/ClassLoading.html#loadProxyClass-java.lang.String-java.lang.String:A-java.lang.ClassLoader-boolean-java.lang.ClassLoader-"><code>loadProxyClass</code></a> has already invoked | |
<code>Security.verifyCodebaseIntegrity</code> with the same | |
value of <code>codebase</code> and the same effective value of | |
<code>verifierLoader</code> as arguments without it throwing an | |
exception). If <code>Security.verifyCodebaseIntegrity</code> | |
throws a <code>SecurityException</code>, then this method | |
proceeds as if <code>codebase</code> were <code>null</code>. | |
If <code>Security.verifyCodebaseIntegrity</code> throws any | |
other exception, then this method throws that exception. | |
<p>This method then invokes <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true#loadClass-java.lang.String-java.lang.String-java.lang.ClassLoader-" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi.loadClass</code></a> with <code>codebase</code> as the | |
first argument (or <code>null</code> if in the previous step | |
<code>Security.verifyCodebaseIntegrity</code> was invoked and | |
it threw a <code>SecurityException</code>), <code>name</code> | |
as the second argument, and <code>defaultLoader</code> as the | |
third argument. If <code>RMIClassLoaderSpi.loadClass</code> | |
throws a <code>ClassNotFoundException</code>, then this method | |
throws a <code>ClassNotFoundException</code>; if | |
<code>RMIClassLoaderSpi.loadClass</code> throws any other | |
exception, then this method throws that exception; otherwise, | |
this method returns the <code>Class</code> returned by | |
<code>RMIClassLoaderSpi.loadClass</code>.</div> | |
<dl> | |
<dt><span class="paramLabel">Parameters:</span></dt> | |
<dd><code>codebase</code> - the list of URLs (separated by spaces) to load | |
the class from, or <code>null</code></dd> | |
<dd><code>name</code> - the name of the class to load</dd> | |
<dd><code>defaultLoader</code> - the class loader value (possibly | |
<code>null</code>) to pass as the <code>defaultLoader</code> | |
argument to <code>RMIClassLoaderSpi.loadClass</code></dd> | |
<dd><code>verifyCodebaseIntegrity</code> - if <code>true</code>, verify | |
that the RFC3986 compliant codebase URIs provide content integrity</dd> | |
<dd><code>verifierLoader</code> - the class loader value (possibly | |
<code>null</code>) to pass to | |
<code>Security.verifyCodebaseIntegrity</code>, if | |
<code>verifyCodebaseIntegrity</code> is <code>true</code></dd> | |
<dt><span class="returnLabel">Returns:</span></dt> | |
<dd>the <code>Class</code> object representing the loaded | |
class</dd> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</a></code> - if | |
<code>Security.verifyCodebaseIntegrity</code> or | |
<code>RMIClassLoaderSpi.loadClass</code> throws a | |
<code>MalformedURLException</code></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 | |
<code>RMIClassLoaderSpi.loadClass</code> throws a | |
<code>ClassNotFoundException</code></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>name</code> is | |
<code>null</code></dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="loadProxyClass-java.lang.String-java.lang.String:A-java.lang.ClassLoader-boolean-java.lang.ClassLoader-"> | |
<!-- --> | |
</a> | |
<ul class="blockListLast"> | |
<li class="blockList"> | |
<h4>loadProxyClass</h4> | |
<pre>public static <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><?> loadProxyClass(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> codebase, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] interfaceNames, | |
<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> defaultLoader, | |
boolean verifyCodebaseIntegrity, | |
<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> verifierLoader) | |
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</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">Loads a dynamic proxy class using <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true#loadProxyClass-java.lang.String-java.lang.String:A-java.lang.ClassLoader-" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi.loadProxyClass(String,String[],ClassLoader)</code></a>, | |
optionally verifying that the RFC3986 compliant | |
codebase URIs provide content integrity. | |
<p>If <code>verifyCodebaseIntegrity</code> is <code>true</code> | |
and <code>codebase</code> is not <code>null</code>, then this | |
method invokes <a href="../../../net/jini/security/Security.html#verifyCodebaseIntegrity-java.lang.String-java.lang.ClassLoader-"><code>Security.verifyCodebaseIntegrity</code></a> with <code>codebase</code> as | |
the first argument and <code>verifierLoader</code> as the | |
second argument (this invocation may be skipped if a previous | |
invocation of this method or <a href="../../../net/jini/loader/ClassLoading.html#loadClass-java.lang.String-java.lang.String-java.lang.ClassLoader-boolean-java.lang.ClassLoader-"><code>loadClass</code></a> has | |
already invoked <code>Security.verifyCodebaseIntegrity</code> | |
with the same value of <code>codebase</code> and the same | |
effective value of <code>verifierLoader</code> as arguments | |
without it throwing an exception). If | |
<code>Security.verifyCodebaseIntegrity</code> throws a | |
<code>SecurityException</code>, then this method proceeds as if | |
<code>codebase</code> were <code>null</code>. If | |
<code>Security.verifyCodebaseIntegrity</code> throws any other | |
exception, then this method throws that exception. | |
<p>This method invokes <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/server/RMIClassLoaderSpi.html?is-external=true#loadProxyClass-java.lang.String-java.lang.String:A-java.lang.ClassLoader-" title="class or interface in java.rmi.server"><code>RMIClassLoaderSpi.loadProxyClass(String,String[],ClassLoader)</code></a> | |
with <code>codebase</code> as | |
the first argument (or <code>null</code> if in the previous | |
step <code>Security.verifyCodebaseIntegrity</code> was invoked | |
and it threw a <code>SecurityException</code>), | |
<code>interfaceNames</code> as the second argument, and | |
<code>defaultLoader</code> as the third argument. If | |
<code>RMIClassLoaderSpi.loadProxyClass</code> throws a | |
<code>ClassNotFoundException</code>, then this method throws a | |
<code>ClassNotFoundException</code>; if | |
<code>RMIClassLoaderSpi.loadProxyClass</code> throws any other | |
exception, then this method throws that exception; otherwise, | |
this method returns the <code>Class</code> returned by | |
<code>RMIClassLoaderSpi.loadProxyClass</code>.</div> | |
<dl> | |
<dt><span class="paramLabel">Parameters:</span></dt> | |
<dd><code>codebase</code> - the list of URLs (separated by spaces) to load | |
classes from, or <code>null</code></dd> | |
<dd><code>interfaceNames</code> - the names of the interfaces for the proxy | |
class to implement</dd> | |
<dd><code>defaultLoader</code> - the class loader value (possibly | |
<code>null</code>) to pass as the <code>defaultLoader</code> | |
argument to <code>RMIClassLoader.loadProxyClass</code></dd> | |
<dd><code>verifyCodebaseIntegrity</code> - if <code>true</code>, verify | |
that the codebase URLs provide content integrity</dd> | |
<dd><code>verifierLoader</code> - the class loader value (possibly | |
<code>null</code>) to pass to | |
<code>Security.verifyCodebaseIntegrity</code>, if | |
<code>verifyCodebaseIntegrity</code> is <code>true</code></dd> | |
<dt><span class="returnLabel">Returns:</span></dt> | |
<dd>the <code>Class</code> object representing the loaded | |
dynamic proxy class</dd> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</a></code> - if | |
<code>Security.verifyCodebaseIntegrity</code> or | |
<code>RMIClassLoaderSpi.loadProxyClass</code> throws a | |
<code>MalformedURLException</code></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 | |
<code>RMIClassLoaderSpi.loadProxyClass</code> throws a | |
<code>ClassNotFoundException</code></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>interfaceNames</code> is | |
<code>null</code> or if any element of | |
<code>interfaceNames</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/ClassLoading.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/loader/ClassAnnotation.html" title="interface in net.jini.loader"><span class="typeNameLink">Prev Class</span></a></li> | |
<li><a href="../../../net/jini/loader/DownloadPermission.html" title="class in net.jini.loader"><span class="typeNameLink">Next Class</span></a></li> | |
</ul> | |
<ul class="navList"> | |
<li><a href="../../../index.html?net/jini/loader/ClassLoading.html" target="_top">Frames</a></li> | |
<li><a href="ClassLoading.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> | |
<div> | |
<ul class="subNavList"> | |
<li>Summary: </li> | |
<li>Nested | </li> | |
<li>Field | </li> | |
<li>Constr | </li> | |
<li><a href="#method.summary">Method</a></li> | |
</ul> | |
<ul class="subNavList"> | |
<li>Detail: </li> | |
<li>Field | </li> | |
<li>Constr | </li> | |
<li><a href="#method.detail">Method</a></li> | |
</ul> | |
</div> | |
<a name="skip.navbar.bottom"> | |
<!-- --> | |
</a></div> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
</body> | |
</html> |