JDK 11 java.naming.jmod - Naming Module

JDK 11 java.naming.jmod is the JMOD file for JDK 11 Naming module.

JDK 11 Naming module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.naming.jmod.

JDK 11 Naming module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.

JDK 11 Naming module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.naming.

You can click and view the content of each source code file in the list below.

✍: FYIcenter

com/sun/jndi/toolkit/ctx/PartialCompositeDirContext.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.toolkit.ctx;

import java.util.Hashtable;

import javax.naming.*;
import javax.naming.directory.*;
import javax.naming.spi.DirectoryManager;

/*
 * Inherit from AtomicContext so that subclasses of PartialCompositeDirContext
 * can get the ns methods defined in subclasses of PartialCompositeContext.
 *
 * Direct subclasses of DirContext should provide implementations for
 * the p_ abstract DirContext methods and override the p_ Context methods
 * (not abstract anymore because they are overridden by ComponentContext
 * (the superclass of AtomicContext)).
 *
 * @author Rosanna Lee
 */

public abstract class PartialCompositeDirContext
        extends AtomicContext implements DirContext {

    protected PartialCompositeDirContext() {
        _contextType = _PARTIAL;
    }

// ------ Abstract methods whose implementation come from subclasses

     /* Equivalent to DirContext methods */
     protected abstract Attributes p_getAttributes(Name name, String[] attrIds,
                                                     Continuation cont)
         throws NamingException;

     protected abstract void p_modifyAttributes(Name name, int mod_op,
                                                Attributes attrs,
                                                Continuation cont)
         throws NamingException;

     protected abstract void p_modifyAttributes(Name name,
                                                ModificationItem[] mods,
                                                Continuation cont)
         throws NamingException;

     protected abstract void p_bind(Name name, Object obj,
                                    Attributes attrs,
                                    Continuation cont)
         throws NamingException;

     protected abstract void p_rebind(Name name, Object obj,
                                      Attributes attrs,
                                      Continuation cont)
         throws NamingException;

     protected abstract DirContext p_createSubcontext(Name name,
                                                     Attributes attrs,
                                                     Continuation cont)
         throws NamingException;

     protected abstract NamingEnumeration<SearchResult> p_search(
                            Name name,
                            Attributes matchingAttributes,
                            String[] attributesToReturn,
                            Continuation cont)
         throws NamingException;

     protected abstract NamingEnumeration<SearchResult> p_search(
                            Name name,
                            String filter,
                            SearchControls cons,
                            Continuation cont)
         throws NamingException;

     protected abstract NamingEnumeration<SearchResult> p_search(
                            Name name,
                            String filterExpr,
                            Object[] filterArgs,
                            SearchControls cons,
                            Continuation cont)
         throws NamingException;

     protected abstract DirContext p_getSchema(Name name, Continuation cont)
         throws NamingException;

     protected abstract DirContext p_getSchemaClassDefinition(Name name,
                                                             Continuation cont)
         throws NamingException;

// ------ implementation for DirContext methods using
// ------ corresponding p_ methods

    public Attributes getAttributes(String name)
            throws NamingException {
        return getAttributes(name, null);
    }

    public Attributes getAttributes(Name name)
            throws NamingException {
        return getAttributes(name, null);
    }

    public Attributes getAttributes(String name, String[] attrIds)
            throws NamingException {
        return getAttributes(new CompositeName(name), attrIds);
    }

    public Attributes getAttributes(Name name, String[] attrIds)
            throws NamingException {
        PartialCompositeDirContext ctx = this;
        Hashtable<?,?> env = p_getEnvironment();
        Continuation cont = new Continuation(name, env);
        Attributes answer;
        Name nm = name;

        try {
            answer = ctx.p_getAttributes(nm, attrIds, cont);
            while (cont.isContinue()) {
                nm = cont.getRemainingName();
                ctx = getPCDirContext(cont);
                answer = ctx.p_getAttributes(nm, attrIds, cont);
            }
        } catch (CannotProceedException e) {
            DirContext cctx = DirectoryManager.getContinuationDirContext(e);
            answer = cctx.getAttributes(e.getRemainingName(), attrIds);
        }
        return answer;
    }

    public void modifyAttributes(String name, int mod_op, Attributes attrs)
            throws NamingException {
        modifyAttributes(new CompositeName(name), mod_op, attrs);
    }

    public void modifyAttributes(Name name, int mod_op, Attributes attrs)
            throws NamingException {
        PartialCompositeDirContext ctx = this;
        Hashtable<?,?> env = p_getEnvironment();
        Continuation cont = new Continuation(name, env);
        Name nm = name;

        try {
            ctx.p_modifyAttributes(nm, mod_op, attrs, cont);
            while (cont.isContinue()) {
                nm = cont.getRemainingName();
                ctx = getPCDirContext(cont);
                ctx.p_modifyAttributes(nm, mod_op, attrs, cont);
            }
        } catch (CannotProceedException e) {
            DirContext cctx = DirectoryManager.getContinuationDirContext(e);
            cctx.modifyAttributes(e.getRemainingName(), mod_op, attrs);
        }
    }

    public void modifyAttributes(String name, ModificationItem[] mods)
            throws NamingException {
        modifyAttributes(new CompositeName(name), mods);
    }

    public void modifyAttributes(Name name, ModificationItem[] mods)
            throws NamingException {
        PartialCompositeDirContext ctx = this;
        Hashtable<?,?> env = p_getEnvironment();
        Continuation cont = new Continuation(name, env);
        Name nm = name;

        try {
            ctx.p_modifyAttributes(nm, mods, cont);
            while (cont.isContinue()) {
                nm = cont.getRemainingName();
                ctx = getPCDirContext(cont);
                ctx.p_modifyAttributes(nm, mods, cont);
            }
        } catch (CannotProceedException e) {
            DirContext cctx = DirectoryManager.getContinuationDirContext(e);
            cctx.modifyAttributes(e.getRemainingName(), mods);
        }
    }

    public void bind(String name, Object obj, Attributes attrs)
            throws NamingException {
        bind(new CompositeName(name), obj, attrs);
    }

    public void bind(Name name, Object obj, Attributes attrs)
            throws NamingException {
        PartialCompositeDirContext ctx = this;
        Hashtable<?,?> env = p_getEnvironment();
        Continuation cont = new Continuation(name, env);
        Name nm = name;

        try {
            ctx.p_bind(nm, obj, attrs, cont);
            while (cont.isContinue()) {
                nm = cont.getRemainingName();
                ctx = getPCDirContext(cont);
                ctx.p_bind(nm, obj, attrs, cont);
            }
        } catch (CannotProceedException e) {
            DirContext cctx = DirectoryManager.getContinuationDirContext(e);
            cctx.bind(e.getRemainingName(), obj, attrs);
        }
    }

    public void rebind(String name, Object obj, Attributes attrs)
            throws NamingException {
        rebind(new CompositeName(name), obj, attrs);
    }

    public void rebind(Name name, Object obj, Attributes attrs)
            throws NamingException {
        PartialCompositeDirContext ctx = this;
        Hashtable<?,?> env = p_getEnvironment();
        Continuation cont = new Continuation(name, env);
        Name nm = name;

        try {
            ctx.p_rebind(nm, obj, attrs, cont);
            while (cont.isContinue()) {
                nm = cont.getRemainingName();
                ctx = getPCDirContext(cont);
                ctx.p_rebind(nm, obj, attrs, cont);
            }
        } catch (CannotProceedException e) {
            DirContext cctx = DirectoryManager.getContinuationDirContext(e);
            cctx.rebind(e.getRemainingName(), obj, attrs);
        }
    }

    public DirContext createSubcontext(String name, Attributes attrs)
            throws NamingException {
        return createSubcontext(new CompositeName(name), attrs);
    }

    public DirContext createSubcontext(Name name, Attributes attrs)
            throws NamingException {
        PartialCompositeDirContext ctx = this;
        Hashtable<?,?> env = p_getEnvironment();
        Continuation cont = new Continuation(name, env);
        DirContext answer;
        Name nm = name;

        try {
            answer = ctx.p_createSubcontext(nm, attrs, cont);
            while (cont.isContinue()) {
                nm = cont.getRemainingName();
                ctx = getPCDirContext(cont);
                answer = ctx.p_createSubcontext(nm, attrs, cont);
            }
        } catch (CannotProceedException e) {
            DirContext cctx = DirectoryManager.getContinuationDirContext(e);
            answer = cctx.createSubcontext(e.getRemainingName(), attrs);
        }
        return answer;
    }

    public NamingEnumeration<SearchResult>
        search(String name, Attributes matchingAttributes)
        throws NamingException
    {
        return search(name, matchingAttributes, null);
    }

    public NamingEnumeration<SearchResult>
        search(Name name, Attributes matchingAttributes)
        throws NamingException
    {
        return search(name, matchingAttributes, null);
    }

    public NamingEnumeration<SearchResult>
        search(String name,
               Attributes matchingAttributes,
               String[] attributesToReturn)
        throws NamingException
    {
        return search(new CompositeName(name),
                      matchingAttributes, attributesToReturn);
    }

    public NamingEnumeration<SearchResult>
        search(Name name,
               Attributes matchingAttributes,
               String[] attributesToReturn)
        throws NamingException
    {

        PartialCompositeDirContext ctx = this;
        Hashtable<?,?> env = p_getEnvironment();
        Continuation cont = new Continuation(name, env);
        NamingEnumeration<SearchResult> answer;
        Name nm = name;

        try {
            answer = ctx.p_search(nm, matchingAttributes,
                                  attributesToReturn, cont);
            while (cont.isContinue()) {
                nm = cont.getRemainingName();
                ctx = getPCDirContext(cont);
                answer = ctx.p_search(nm, matchingAttributes,
                                      attributesToReturn, cont);
            }
        } catch (CannotProceedException e) {
            DirContext cctx = DirectoryManager.getContinuationDirContext(e);
            answer = cctx.search(e.getRemainingName(), matchingAttributes,
                                 attributesToReturn);
        }
        return answer;
    }

    public NamingEnumeration<SearchResult>
        search(String name,
               String filter,
               SearchControls cons)
        throws NamingException
    {
        return search(new CompositeName(name), filter, cons);
    }

    public NamingEnumeration<SearchResult>
        search(Name name,
               String filter,
               SearchControls cons)
        throws NamingException
    {

        PartialCompositeDirContext ctx = this;
        Hashtable<?,?> env = p_getEnvironment();
        Continuation cont = new Continuation(name, env);
        NamingEnumeration<SearchResult> answer;
        Name nm = name;

        try {
            answer = ctx.p_search(nm, filter, cons, cont);
            while (cont.isContinue()) {
                nm = cont.getRemainingName();
                ctx = getPCDirContext(cont);
                answer = ctx.p_search(nm, filter, cons, cont);
            }
        } catch (CannotProceedException e) {
            DirContext cctx = DirectoryManager.getContinuationDirContext(e);
            answer = cctx.search(e.getRemainingName(), filter, cons);
        }
        return answer;
    }

    public NamingEnumeration<SearchResult>
        search(String name,
               String filterExpr,
               Object[] filterArgs,
               SearchControls cons)
        throws NamingException
    {
        return search(new CompositeName(name), filterExpr, filterArgs, cons);
    }

    public NamingEnumeration<SearchResult>
        search(Name name,
               String filterExpr,
               Object[] filterArgs,
               SearchControls cons)
        throws NamingException
    {

        PartialCompositeDirContext ctx = this;
        Hashtable<?,?> env = p_getEnvironment();
        Continuation cont = new Continuation(name, env);
        NamingEnumeration<SearchResult> answer;
        Name nm = name;

        try {
            answer = ctx.p_search(nm, filterExpr, filterArgs, cons, cont);
            while (cont.isContinue()) {
                nm = cont.getRemainingName();
                ctx = getPCDirContext(cont);
                answer = ctx.p_search(nm, filterExpr, filterArgs, cons, cont);
            }
        } catch (CannotProceedException e) {
            DirContext cctx = DirectoryManager.getContinuationDirContext(e);
            answer = cctx.search(e.getRemainingName(), filterExpr, filterArgs,
                                 cons);
        }
        return answer;
    }

    public DirContext getSchema(String name) throws NamingException {
        return getSchema(new CompositeName(name));
    }

    public DirContext getSchema(Name name) throws NamingException {
        PartialCompositeDirContext ctx = this;
        Hashtable<?,?> env = p_getEnvironment();
        Continuation cont = new Continuation(name, env);
        DirContext answer;
        Name nm = name;

        try {
            answer = ctx.p_getSchema(nm, cont);
            while (cont.isContinue()) {
                nm = cont.getRemainingName();
                ctx = getPCDirContext(cont);
                answer = ctx.p_getSchema(nm, cont);
            }
        } catch (CannotProceedException e) {
            DirContext cctx = DirectoryManager.getContinuationDirContext(e);
            answer = cctx.getSchema(e.getRemainingName());
        }
        return answer;
    }

    public DirContext getSchemaClassDefinition(String name)
            throws NamingException {
        return getSchemaClassDefinition(new CompositeName(name));
    }

    public DirContext getSchemaClassDefinition(Name name)
            throws NamingException {
        PartialCompositeDirContext ctx = this;
        Hashtable<?,?> env = p_getEnvironment();
        Continuation cont = new Continuation(name, env);
        DirContext answer;
        Name nm = name;

        try {
            answer = ctx.p_getSchemaClassDefinition(nm, cont);
            while (cont.isContinue()) {
                nm = cont.getRemainingName();
                ctx = getPCDirContext(cont);
                answer = ctx.p_getSchemaClassDefinition(nm, cont);
            }
        } catch (CannotProceedException e) {
            DirContext cctx = DirectoryManager.getContinuationDirContext(e);
            answer = cctx.getSchemaClassDefinition(e.getRemainingName());
        }
        return answer;
    }

// ------ internal method used by PartialCompositeDirContext

    /**
     * Retrieves a PartialCompositeDirContext for the resolved object in
     * cont.  Throws CannotProceedException if not successful.
     */
    protected static PartialCompositeDirContext getPCDirContext(Continuation cont)
            throws NamingException {

        PartialCompositeContext pctx =
            PartialCompositeContext.getPCContext(cont);

        if (!(pctx instanceof PartialCompositeDirContext)) {
            throw cont.fillInException(
                    new NotContextException(
                            "Resolved object is not a DirContext."));
        }

        return (PartialCompositeDirContext)pctx;
    }


//------ Compensation for inheriting from AtomicContext

    /*
     * Dummy implementations defined here so that direct subclasses
     * of PartialCompositeDirContext or ComponentDirContext do not
     * have to provide dummy implementations for these.
     * Override these for subclasses of AtomicDirContext.
     */

    protected StringHeadTail c_parseComponent(String inputName,
        Continuation cont) throws NamingException {
            OperationNotSupportedException e = new
                OperationNotSupportedException();
            throw cont.fillInException(e);
        }

    protected Object a_lookup(String name, Continuation cont)
        throws NamingException {
            OperationNotSupportedException e = new
                OperationNotSupportedException();
            throw cont.fillInException(e);
        }

    protected Object a_lookupLink(String name, Continuation cont)
        throws NamingException {
            OperationNotSupportedException e = new
                OperationNotSupportedException();
            throw cont.fillInException(e);
        }

    protected NamingEnumeration<NameClassPair> a_list(
        Continuation cont) throws NamingException {
            OperationNotSupportedException e = new
                OperationNotSupportedException();
            throw cont.fillInException(e);
        }

    protected NamingEnumeration<Binding> a_listBindings(
        Continuation cont) throws NamingException {
            OperationNotSupportedException e = new
                OperationNotSupportedException();
            throw cont.fillInException(e);
        }

    protected void a_bind(String name, Object obj, Continuation cont)
        throws NamingException {
            OperationNotSupportedException e = new
                OperationNotSupportedException();
            throw cont.fillInException(e);
        }

    protected void a_rebind(String name, Object obj, Continuation cont)
        throws NamingException {
            OperationNotSupportedException e = new
                OperationNotSupportedException();
            throw cont.fillInException(e);
        }

    protected void a_unbind(String name, Continuation cont)
        throws NamingException {
            OperationNotSupportedException e = new
                OperationNotSupportedException();
            throw cont.fillInException(e);
        }

    protected void a_destroySubcontext(String name, Continuation cont)
        throws NamingException {
            OperationNotSupportedException e = new
                OperationNotSupportedException();
            throw cont.fillInException(e);
        }

    protected Context a_createSubcontext(String name, Continuation cont)
        throws NamingException {
            OperationNotSupportedException e = new
                OperationNotSupportedException();
            throw cont.fillInException(e);
        }

    protected void a_rename(String oldname, Name newname,
        Continuation cont) throws NamingException {
            OperationNotSupportedException e = new
                OperationNotSupportedException();
            throw cont.fillInException(e);
        }

    protected NameParser a_getNameParser(Continuation cont)
        throws NamingException {
            OperationNotSupportedException e = new
                OperationNotSupportedException();
            throw cont.fillInException(e);
        }
}

com/sun/jndi/toolkit/ctx/PartialCompositeDirContext.java

 

Or download all of them as a single archive file:

File name: java.naming-11.0.1-src.zip
File size: 461792 bytes
Release date: 2018-11-04
Download 

 

JDK 11 java.net.http.jmod - Net HTTP Module

JDK 11 java.management.rmi.jmod - Management RMI Module

Download and Use JDK 11

⇑⇑ FAQ for JDK (Java Development Kit)

2020-09-30, 52580👍, 0💬