Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 11 jdk.naming.rmi.jmod - Naming RMI Module
JDK 11 jdk.naming.rmi.jmod is the JMOD file for JDK 11 Naming RMI module.
JDK 11 Naming RMI module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.naming.rmi.jmod.
JDK 11 Naming RMI module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Naming RMI module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.naming.rmi.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/jndi/rmi/registry/RegistryContextFactory.java
/* * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.jndi.rmi.registry; import java.util.Enumeration; import java.util.Hashtable; import javax.naming.*; import javax.naming.spi.*; import com.sun.jndi.url.rmi.rmiURLContextFactory; /** * A RegistryContextFactory takes an RMI registry reference, and * creates the corresponding RMI object or registry context. In * addition, it serves as the initial context factory when using an * RMI registry as an initial context. *<p> * When an initial context is being created, the environment * property "java.naming.provider.url" should contain the RMI URL of * the appropriate registry. Otherwise, the default URL "rmi:" is used. *<p> * An RMI registry reference contains one or more StringRefAddrs of * type "URL", each containing a single RMI URL. Other addresses * are ignored. Multiple URLs represent alternative addresses for the * same logical resource. The order of the addresses is not significant. * * @author Scott Seligman */ public class RegistryContextFactory implements ObjectFactory, InitialContextFactory { /** * The type of each address in an RMI registry reference. */ public final static String ADDRESS_TYPE = "URL"; public Context getInitialContext(Hashtable<?,?> env) throws NamingException { if (env != null) { env = (Hashtable) env.clone(); } return URLToContext(getInitCtxURL(env), env); } public Object getObjectInstance(Object ref, Name name, Context nameCtx, Hashtable<?,?> env) throws NamingException { if (!isRegistryRef(ref)) { return null; } /* * No need to clone env here. If getObjectInstance() * returns something other than a RegistryContext (which * happens if you're looking up an object bound in the * registry, as opposed to looking up the registry itself), * then the context is GCed right away and there's no need to * clone the environment. If getObjectInstance() returns a * RegistryContext, then it still goes through * GenericURLContext, which calls RegistryContext.lookup() * with an empty name, which clones the environment. */ Object obj = URLsToObject(getURLs((Reference)ref), env); if (obj instanceof RegistryContext) { RegistryContext ctx = (RegistryContext)obj; ctx.reference = (Reference)ref; } return obj; } private static Context URLToContext(String url, Hashtable<?,?> env) throws NamingException { rmiURLContextFactory factory = new rmiURLContextFactory(); Object obj = factory.getObjectInstance(url, null, null, env); if (obj instanceof Context) { return (Context)obj; } else { throw (new NotContextException(url)); } } private static Object URLsToObject(String[] urls, Hashtable<?,?> env) throws NamingException { rmiURLContextFactory factory = new rmiURLContextFactory(); return factory.getObjectInstance(urls, null, null, env); } /** * Reads environment to find URL of initial context. * The default URL is "rmi:". */ private static String getInitCtxURL(Hashtable<?,?> env) { final String defaultURL = "rmi:"; String url = null; if (env != null) { url = (String)env.get(Context.PROVIDER_URL); } return ((url != null) ? url : defaultURL); } /** * Returns true if argument is an RMI registry reference. */ private static boolean isRegistryRef(Object obj) { if (!(obj instanceof Reference)) { return false; } String thisClassName = RegistryContextFactory.class.getName(); Reference ref = (Reference)obj; return thisClassName.equals(ref.getFactoryClassName()); } /** * Returns the URLs contained within an RMI registry reference. */ private static String[] getURLs(Reference ref) throws NamingException { int size = 0; // number of URLs String[] urls = new String[ref.size()]; Enumeration<RefAddr> addrs = ref.getAll(); while (addrs.hasMoreElements()) { RefAddr addr = addrs.nextElement(); if ((addr instanceof StringRefAddr) && addr.getType().equals(ADDRESS_TYPE)) { urls[size++] = (String)addr.getContent(); } } if (size == 0) { throw (new ConfigurationException( "Reference contains no valid addresses")); } // Trim URL array down to size. if (size == ref.size()) { return urls; } String[] urls2 = new String[size]; System.arraycopy(urls, 0, urls2, 0, size); return urls2; } }
⏎ com/sun/jndi/rmi/registry/RegistryContextFactory.java
Or download all of them as a single archive file:
File name: jdk.naming.rmi-11.0.1-src.zip File size: 11809 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.net.jmod - Net Module
2020-04-25, 5770👍, 0💬
Popular Posts:
JDK 17 jdk.jdi.jmod is the JMOD file for JDK 17 JDI (Java Debug Interface) tool. JDK 17 JDI tool com...
How to perform XML Schema validation with sax\Writer.java provided in the Apache Xerces package? You...
What Is jaxb-impl-2.1.12.jar? Java Architecture for XML Binding (JAXB) is a Java API that allows Jav...
Where to find answers to frequently asked questions on Downloading and Installing Connector/J - JDBC...
What Is jaxb-api-2.1.6.jar? Java Architecture for XML Binding (JAXB) is a Java API that allows Java ...