Java Code Examples for org.omg.CosNaming.NamingContext#destroy()

The following examples show how to use org.omg.CosNaming.NamingContext#destroy() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NamingContextImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Create a new NamingContext, bind it in this Naming Context and return
 * its object reference. This is equivalent to using new_context() followed
 * by bind_context() with the supplied name and the object reference for
 * the newly created NamingContext.
 * @param n a sequence of NameComponents which is the name to be unbound.
 * @return an object reference for a new NamingContext object implemented
 * by this Name Server, bound to the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound An object
 * is already bound under the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.NotFound A name with
 * multiple components was supplied, but the first component could not be
 * resolved.
 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Could not
 * proceed in resolving the n-1 components of the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName The
 * supplied name is invalid (i.e., has length less than 1).
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 * @see new_context
 * @see bind_context
 */
public  NamingContext bind_new_context(NameComponent[] n)
    throws org.omg.CosNaming.NamingContextPackage.NotFound,
           org.omg.CosNaming.NamingContextPackage.AlreadyBound,
           org.omg.CosNaming.NamingContextPackage.CannotProceed,
           org.omg.CosNaming.NamingContextPackage.InvalidName
{
    NamingContext nc = null;
    NamingContext rnc = null;
    try {
        if (debug)
            dprint("bind_new_context " + nameToString(n));
        // The obvious solution:
        nc = this.new_context();
        this.bind_context(n,nc);
        rnc = nc;
        nc = null;
    } finally {
        try {
            if(nc != null)
                nc.destroy();
        } catch (org.omg.CosNaming.NamingContextPackage.NotEmpty e) {
        }
    }
    if( updateLogger.isLoggable( Level.FINE ) ) {
        // isLoggable call to make sure that we save some precious
        // processor cycles, if there is no need to log.
        updateLogger.fine ( LogKeywords.NAMING_BIND +
            "New Context Bound To " +
            NamingUtils.getDirectoryStructuredName( n ) );
    }
    return rnc;
}
 
Example 2
Source File: NamingContextImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a new NamingContext, bind it in this Naming Context and return
 * its object reference. This is equivalent to using new_context() followed
 * by bind_context() with the supplied name and the object reference for
 * the newly created NamingContext.
 * @param n a sequence of NameComponents which is the name to be unbound.
 * @return an object reference for a new NamingContext object implemented
 * by this Name Server, bound to the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound An object
 * is already bound under the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.NotFound A name with
 * multiple components was supplied, but the first component could not be
 * resolved.
 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Could not
 * proceed in resolving the n-1 components of the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName The
 * supplied name is invalid (i.e., has length less than 1).
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 * @see new_context
 * @see bind_context
 */
public  NamingContext bind_new_context(NameComponent[] n)
    throws org.omg.CosNaming.NamingContextPackage.NotFound,
           org.omg.CosNaming.NamingContextPackage.AlreadyBound,
           org.omg.CosNaming.NamingContextPackage.CannotProceed,
           org.omg.CosNaming.NamingContextPackage.InvalidName
{
    NamingContext nc = null;
    NamingContext rnc = null;
    try {
        if (debug)
            dprint("bind_new_context " + nameToString(n));
        // The obvious solution:
        nc = this.new_context();
        this.bind_context(n,nc);
        rnc = nc;
        nc = null;
    } finally {
        try {
            if(nc != null)
                nc.destroy();
        } catch (org.omg.CosNaming.NamingContextPackage.NotEmpty e) {
        }
    }
    if( updateLogger.isLoggable( Level.FINE ) ) {
        // isLoggable call to make sure that we save some precious
        // processor cycles, if there is no need to log.
        updateLogger.fine ( LogKeywords.NAMING_BIND +
            "New Context Bound To " +
            NamingUtils.getDirectoryStructuredName( n ) );
    }
    return rnc;
}
 
Example 3
Source File: NamingContextImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a new NamingContext, bind it in this Naming Context and return
 * its object reference. This is equivalent to using new_context() followed
 * by bind_context() with the supplied name and the object reference for
 * the newly created NamingContext.
 * @param n a sequence of NameComponents which is the name to be unbound.
 * @return an object reference for a new NamingContext object implemented
 * by this Name Server, bound to the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound An object
 * is already bound under the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.NotFound A name with
 * multiple components was supplied, but the first component could not be
 * resolved.
 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Could not
 * proceed in resolving the n-1 components of the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName The
 * supplied name is invalid (i.e., has length less than 1).
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 * @see new_context
 * @see bind_context
 */
public  NamingContext bind_new_context(NameComponent[] n)
    throws org.omg.CosNaming.NamingContextPackage.NotFound,
           org.omg.CosNaming.NamingContextPackage.AlreadyBound,
           org.omg.CosNaming.NamingContextPackage.CannotProceed,
           org.omg.CosNaming.NamingContextPackage.InvalidName
{
    NamingContext nc = null;
    NamingContext rnc = null;
    try {
        if (debug)
            dprint("bind_new_context " + nameToString(n));
        // The obvious solution:
        nc = this.new_context();
        this.bind_context(n,nc);
        rnc = nc;
        nc = null;
    } finally {
        try {
            if(nc != null)
                nc.destroy();
        } catch (org.omg.CosNaming.NamingContextPackage.NotEmpty e) {
        }
    }
    if( updateLogger.isLoggable( Level.FINE ) ) {
        // isLoggable call to make sure that we save some precious
        // processor cycles, if there is no need to log.
        updateLogger.fine ( LogKeywords.NAMING_BIND +
            "New Context Bound To " +
            NamingUtils.getDirectoryStructuredName( n ) );
    }
    return rnc;
}
 
Example 4
Source File: NamingContextImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Create a new NamingContext, bind it in this Naming Context and return
 * its object reference. This is equivalent to using new_context() followed
 * by bind_context() with the supplied name and the object reference for
 * the newly created NamingContext.
 * @param n a sequence of NameComponents which is the name to be unbound.
 * @return an object reference for a new NamingContext object implemented
 * by this Name Server, bound to the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound An object
 * is already bound under the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.NotFound A name with
 * multiple components was supplied, but the first component could not be
 * resolved.
 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Could not
 * proceed in resolving the n-1 components of the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName The
 * supplied name is invalid (i.e., has length less than 1).
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 * @see new_context
 * @see bind_context
 */
public  NamingContext bind_new_context(NameComponent[] n)
    throws org.omg.CosNaming.NamingContextPackage.NotFound,
           org.omg.CosNaming.NamingContextPackage.AlreadyBound,
           org.omg.CosNaming.NamingContextPackage.CannotProceed,
           org.omg.CosNaming.NamingContextPackage.InvalidName
{
    NamingContext nc = null;
    NamingContext rnc = null;
    try {
        if (debug)
            dprint("bind_new_context " + nameToString(n));
        // The obvious solution:
        nc = this.new_context();
        this.bind_context(n,nc);
        rnc = nc;
        nc = null;
    } finally {
        try {
            if(nc != null)
                nc.destroy();
        } catch (org.omg.CosNaming.NamingContextPackage.NotEmpty e) {
        }
    }
    if( updateLogger.isLoggable( Level.FINE ) ) {
        // isLoggable call to make sure that we save some precious
        // processor cycles, if there is no need to log.
        updateLogger.fine ( LogKeywords.NAMING_BIND +
            "New Context Bound To " +
            NamingUtils.getDirectoryStructuredName( n ) );
    }
    return rnc;
}
 
Example 5
Source File: NamingContextImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a new NamingContext, bind it in this Naming Context and return
 * its object reference. This is equivalent to using new_context() followed
 * by bind_context() with the supplied name and the object reference for
 * the newly created NamingContext.
 * @param n a sequence of NameComponents which is the name to be unbound.
 * @return an object reference for a new NamingContext object implemented
 * by this Name Server, bound to the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound An object
 * is already bound under the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.NotFound A name with
 * multiple components was supplied, but the first component could not be
 * resolved.
 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Could not
 * proceed in resolving the n-1 components of the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName The
 * supplied name is invalid (i.e., has length less than 1).
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 * @see new_context
 * @see bind_context
 */
public  NamingContext bind_new_context(NameComponent[] n)
    throws org.omg.CosNaming.NamingContextPackage.NotFound,
           org.omg.CosNaming.NamingContextPackage.AlreadyBound,
           org.omg.CosNaming.NamingContextPackage.CannotProceed,
           org.omg.CosNaming.NamingContextPackage.InvalidName
{
    NamingContext nc = null;
    NamingContext rnc = null;
    try {
        if (debug)
            dprint("bind_new_context " + nameToString(n));
        // The obvious solution:
        nc = this.new_context();
        this.bind_context(n,nc);
        rnc = nc;
        nc = null;
    } finally {
        try {
            if(nc != null)
                nc.destroy();
        } catch (org.omg.CosNaming.NamingContextPackage.NotEmpty e) {
        }
    }
    if( updateLogger.isLoggable( Level.FINE ) ) {
        // isLoggable call to make sure that we save some precious
        // processor cycles, if there is no need to log.
        updateLogger.fine ( LogKeywords.NAMING_BIND +
            "New Context Bound To " +
            NamingUtils.getDirectoryStructuredName( n ) );
    }
    return rnc;
}
 
Example 6
Source File: NamingContextImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a new NamingContext, bind it in this Naming Context and return
 * its object reference. This is equivalent to using new_context() followed
 * by bind_context() with the supplied name and the object reference for
 * the newly created NamingContext.
 * @param n a sequence of NameComponents which is the name to be unbound.
 * @return an object reference for a new NamingContext object implemented
 * by this Name Server, bound to the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound An object
 * is already bound under the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.NotFound A name with
 * multiple components was supplied, but the first component could not be
 * resolved.
 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Could not
 * proceed in resolving the n-1 components of the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName The
 * supplied name is invalid (i.e., has length less than 1).
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 * @see new_context
 * @see bind_context
 */
public  NamingContext bind_new_context(NameComponent[] n)
    throws org.omg.CosNaming.NamingContextPackage.NotFound,
           org.omg.CosNaming.NamingContextPackage.AlreadyBound,
           org.omg.CosNaming.NamingContextPackage.CannotProceed,
           org.omg.CosNaming.NamingContextPackage.InvalidName
{
    NamingContext nc = null;
    NamingContext rnc = null;
    try {
        if (debug)
            dprint("bind_new_context " + nameToString(n));
        // The obvious solution:
        nc = this.new_context();
        this.bind_context(n,nc);
        rnc = nc;
        nc = null;
    } finally {
        try {
            if(nc != null)
                nc.destroy();
        } catch (org.omg.CosNaming.NamingContextPackage.NotEmpty e) {
        }
    }
    if( updateLogger.isLoggable( Level.FINE ) ) {
        // isLoggable call to make sure that we save some precious
        // processor cycles, if there is no need to log.
        updateLogger.fine ( LogKeywords.NAMING_BIND +
            "New Context Bound To " +
            NamingUtils.getDirectoryStructuredName( n ) );
    }
    return rnc;
}
 
Example 7
Source File: NamingContextImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a new NamingContext, bind it in this Naming Context and return
 * its object reference. This is equivalent to using new_context() followed
 * by bind_context() with the supplied name and the object reference for
 * the newly created NamingContext.
 * @param n a sequence of NameComponents which is the name to be unbound.
 * @return an object reference for a new NamingContext object implemented
 * by this Name Server, bound to the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound An object
 * is already bound under the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.NotFound A name with
 * multiple components was supplied, but the first component could not be
 * resolved.
 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Could not
 * proceed in resolving the n-1 components of the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName The
 * supplied name is invalid (i.e., has length less than 1).
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 * @see new_context
 * @see bind_context
 */
public  NamingContext bind_new_context(NameComponent[] n)
    throws org.omg.CosNaming.NamingContextPackage.NotFound,
           org.omg.CosNaming.NamingContextPackage.AlreadyBound,
           org.omg.CosNaming.NamingContextPackage.CannotProceed,
           org.omg.CosNaming.NamingContextPackage.InvalidName
{
    NamingContext nc = null;
    NamingContext rnc = null;
    try {
        if (debug)
            dprint("bind_new_context " + nameToString(n));
        // The obvious solution:
        nc = this.new_context();
        this.bind_context(n,nc);
        rnc = nc;
        nc = null;
    } finally {
        try {
            if(nc != null)
                nc.destroy();
        } catch (org.omg.CosNaming.NamingContextPackage.NotEmpty e) {
        }
    }
    if( updateLogger.isLoggable( Level.FINE ) ) {
        // isLoggable call to make sure that we save some precious
        // processor cycles, if there is no need to log.
        updateLogger.fine ( LogKeywords.NAMING_BIND +
            "New Context Bound To " +
            NamingUtils.getDirectoryStructuredName( n ) );
    }
    return rnc;
}
 
Example 8
Source File: NamingContextImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a new NamingContext, bind it in this Naming Context and return
 * its object reference. This is equivalent to using new_context() followed
 * by bind_context() with the supplied name and the object reference for
 * the newly created NamingContext.
 * @param n a sequence of NameComponents which is the name to be unbound.
 * @return an object reference for a new NamingContext object implemented
 * by this Name Server, bound to the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound An object
 * is already bound under the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.NotFound A name with
 * multiple components was supplied, but the first component could not be
 * resolved.
 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Could not
 * proceed in resolving the n-1 components of the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName The
 * supplied name is invalid (i.e., has length less than 1).
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 * @see new_context
 * @see bind_context
 */
public  NamingContext bind_new_context(NameComponent[] n)
    throws org.omg.CosNaming.NamingContextPackage.NotFound,
           org.omg.CosNaming.NamingContextPackage.AlreadyBound,
           org.omg.CosNaming.NamingContextPackage.CannotProceed,
           org.omg.CosNaming.NamingContextPackage.InvalidName
{
    NamingContext nc = null;
    NamingContext rnc = null;
    try {
        if (debug)
            dprint("bind_new_context " + nameToString(n));
        // The obvious solution:
        nc = this.new_context();
        this.bind_context(n,nc);
        rnc = nc;
        nc = null;
    } finally {
        try {
            if(nc != null)
                nc.destroy();
        } catch (org.omg.CosNaming.NamingContextPackage.NotEmpty e) {
        }
    }
    if( updateLogger.isLoggable( Level.FINE ) ) {
        // isLoggable call to make sure that we save some precious
        // processor cycles, if there is no need to log.
        updateLogger.fine ( LogKeywords.NAMING_BIND +
            "New Context Bound To " +
            NamingUtils.getDirectoryStructuredName( n ) );
    }
    return rnc;
}
 
Example 9
Source File: NamingContextImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a new NamingContext, bind it in this Naming Context and return
 * its object reference. This is equivalent to using new_context() followed
 * by bind_context() with the supplied name and the object reference for
 * the newly created NamingContext.
 * @param n a sequence of NameComponents which is the name to be unbound.
 * @return an object reference for a new NamingContext object implemented
 * by this Name Server, bound to the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound An object
 * is already bound under the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.NotFound A name with
 * multiple components was supplied, but the first component could not be
 * resolved.
 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Could not
 * proceed in resolving the n-1 components of the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName The
 * supplied name is invalid (i.e., has length less than 1).
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 * @see new_context
 * @see bind_context
 */
public  NamingContext bind_new_context(NameComponent[] n)
    throws org.omg.CosNaming.NamingContextPackage.NotFound,
           org.omg.CosNaming.NamingContextPackage.AlreadyBound,
           org.omg.CosNaming.NamingContextPackage.CannotProceed,
           org.omg.CosNaming.NamingContextPackage.InvalidName
{
    NamingContext nc = null;
    NamingContext rnc = null;
    try {
        if (debug)
            dprint("bind_new_context " + nameToString(n));
        // The obvious solution:
        nc = this.new_context();
        this.bind_context(n,nc);
        rnc = nc;
        nc = null;
    } finally {
        try {
            if(nc != null)
                nc.destroy();
        } catch (org.omg.CosNaming.NamingContextPackage.NotEmpty e) {
        }
    }
    if( updateLogger.isLoggable( Level.FINE ) ) {
        // isLoggable call to make sure that we save some precious
        // processor cycles, if there is no need to log.
        updateLogger.fine ( LogKeywords.NAMING_BIND +
            "New Context Bound To " +
            NamingUtils.getDirectoryStructuredName( n ) );
    }
    return rnc;
}
 
Example 10
Source File: NamingContextImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a new NamingContext, bind it in this Naming Context and return
 * its object reference. This is equivalent to using new_context() followed
 * by bind_context() with the supplied name and the object reference for
 * the newly created NamingContext.
 * @param n a sequence of NameComponents which is the name to be unbound.
 * @return an object reference for a new NamingContext object implemented
 * by this Name Server, bound to the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound An object
 * is already bound under the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.NotFound A name with
 * multiple components was supplied, but the first component could not be
 * resolved.
 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Could not
 * proceed in resolving the n-1 components of the supplied name.
 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName The
 * supplied name is invalid (i.e., has length less than 1).
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 * @see new_context
 * @see bind_context
 */
public  NamingContext bind_new_context(NameComponent[] n)
    throws org.omg.CosNaming.NamingContextPackage.NotFound,
           org.omg.CosNaming.NamingContextPackage.AlreadyBound,
           org.omg.CosNaming.NamingContextPackage.CannotProceed,
           org.omg.CosNaming.NamingContextPackage.InvalidName
{
    NamingContext nc = null;
    NamingContext rnc = null;
    try {
        if (debug)
            dprint("bind_new_context " + nameToString(n));
        // The obvious solution:
        nc = this.new_context();
        this.bind_context(n,nc);
        rnc = nc;
        nc = null;
    } finally {
        try {
            if(nc != null)
                nc.destroy();
        } catch (org.omg.CosNaming.NamingContextPackage.NotEmpty e) {
        }
    }
    if( updateLogger.isLoggable( Level.FINE ) ) {
        // isLoggable call to make sure that we save some precious
        // processor cycles, if there is no need to log.
        updateLogger.fine ( LogKeywords.NAMING_BIND +
            "New Context Bound To " +
            NamingUtils.getDirectoryStructuredName( n ) );
    }
    return rnc;
}