|
Java example source code file (RMIClassLoaderSpi.java)
The RMIClassLoaderSpi.java Java example source code/* * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package java.rmi.server; import java.net.MalformedURLException; import java.net.URL; /** * <code>RMIClassLoaderSpi is the service provider interface for * <code>RMIClassLoader. * * In particular, an <code>RMIClassLoaderSpi instance provides an * implementation of the following static methods of * <code>RMIClassLoader: * * <ul> * * <li>{@link RMIClassLoader#loadClass(URL,String)} * <li>{@link RMIClassLoader#loadClass(String,String)} * <li>{@link RMIClassLoader#loadClass(String,String,ClassLoader)} * <li>{@link RMIClassLoader#loadProxyClass(String,String[],ClassLoader)} * <li>{@link RMIClassLoader#getClassLoader(String)} * <li>{@link RMIClassLoader#getClassAnnotation(Class)} * * </ul> * * When one of those methods is invoked, its behavior is to delegate * to a corresponding method on an instance of this class. * The details of how each method delegates to the provider instance is * described in the documentation for each particular method. * See the documentation for {@link RMIClassLoader} for a description * of how a provider instance is chosen. * * @author Peter Jones * @author Laird Dornin * @see RMIClassLoader * @since 1.4 */ public abstract class RMIClassLoaderSpi { /** * Provides the implementation for * {@link RMIClassLoader#loadClass(URL,String)}, * {@link RMIClassLoader#loadClass(String,String)}, and * {@link RMIClassLoader#loadClass(String,String,ClassLoader)}. * * Loads a class from a codebase URL path, optionally using the * supplied loader. * * Typically, a provider implementation will attempt to * resolve the named class using the given <code>defaultLoader, * if specified, before attempting to resolve the class from the * codebase URL path. * * <p>An implementation of this method must either return a class * with the given name or throw an exception. * * @param codebase the list of URLs (separated by spaces) to load * the class from, or <code>null * * @param name the name of the class to load * * @param defaultLoader additional contextual class loader * to use, or <code>null * * @return the <code>Class object representing the loaded class * * @throws MalformedURLException if <code>codebase is * non-<code>null and contains an invalid URL, or * if <code>codebase is Other Java examples (source code examples)Here is a short list of links related to this Java RMIClassLoaderSpi.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.