Java Code Examples for com.sun.corba.se.impl.naming.cosnaming.NamingContextDataStore#Unbind

The following examples show how to use com.sun.corba.se.impl.naming.cosnaming.NamingContextDataStore#Unbind . 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 openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new InvalidName();

 // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) ) {
             throw new InvalidName();
         }

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 2
Source File: NamingContextImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

     // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) )
             throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new org.omg.CosNaming.NamingContextPackage.NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 3
Source File: NamingContextImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new InvalidName();

 // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) ) {
             throw new InvalidName();
         }

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 4
Source File: NamingContextImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

     // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) )
             throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new org.omg.CosNaming.NamingContextPackage.NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 5
Source File: NamingContextImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new InvalidName();

 // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) ) {
             throw new InvalidName();
         }

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 6
Source File: NamingContextImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

     // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) )
             throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new org.omg.CosNaming.NamingContextPackage.NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 7
Source File: NamingContextImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new InvalidName();

 // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) ) {
             throw new InvalidName();
         }

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 8
Source File: NamingContextImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

     // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) )
             throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new org.omg.CosNaming.NamingContextPackage.NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 9
Source File: NamingContextImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new InvalidName();

 // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) ) {
             throw new InvalidName();
         }

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 10
Source File: NamingContextImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

     // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) )
             throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new org.omg.CosNaming.NamingContextPackage.NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 11
Source File: NamingContextImpl.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new InvalidName();

 // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) ) {
             throw new InvalidName();
         }

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 12
Source File: NamingContextImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

     // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) )
             throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new org.omg.CosNaming.NamingContextPackage.NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 13
Source File: NamingContextImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new InvalidName();

 // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) ) {
             throw new InvalidName();
         }

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 14
Source File: NamingContextImpl.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

     // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) )
             throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new org.omg.CosNaming.NamingContextPackage.NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 15
Source File: NamingContextImpl.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new InvalidName();

 // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) ) {
             throw new InvalidName();
         }

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 16
Source File: NamingContextImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

     // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) )
             throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new org.omg.CosNaming.NamingContextPackage.NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 17
Source File: NamingContextImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new InvalidName();

 // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) ) {
             throw new InvalidName();
         }

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 18
Source File: NamingContextImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

     // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) )
             throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new org.omg.CosNaming.NamingContextPackage.NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 19
Source File: NamingContextImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new InvalidName();

 // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) ) {
             throw new InvalidName();
         }

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }
 
Example 20
Source File: NamingContextImpl.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
/**
* Implements unbinding bound names in this NamingContext. If the
* name contains only one component, the name is unbound in this
* NamingContext using Unbind(). Otherwise, the first component
* of the name is resolved in this NamingContext and
* unbind passed to the resulting NamingContext.
* This method is static for maximal reuse - even for extended naming
* context implementations where the recursive semantics still apply.
* @param impl an implementation of NamingContextDataStore
* @param n a sequence of NameComponents which is the name to be unbound.
* @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 resolve
*/
 public static void doUnbind(NamingContextDataStore impl,
                             NameComponent[] n)
     throws org.omg.CosNaming.NamingContextPackage.NotFound,
            org.omg.CosNaming.NamingContextPackage.CannotProceed,
            org.omg.CosNaming.NamingContextPackage.InvalidName
 {
     // Name valid?
     if (n.length < 1)
         throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

     // Unbind here?
     if (n.length == 1) {
         // The identifier must be set
         if ( (n[0].id.length() == 0) && (n[0].kind.length() == 0 ) )
             throw new org.omg.CosNaming.NamingContextPackage.InvalidName();

         org.omg.CORBA.Object objRef = null;
         synchronized (impl) {
             // Yes: unbind in this context
             objRef = impl.Unbind(n[0]);
         }

         if (objRef == null)
             // It was not bound
             throw new org.omg.CosNaming.NamingContextPackage.NotFound(NotFoundReason.missing_node,n);
         // Done
         return;
     } else {
         // No: unbind in a different context

   // Resolve first  - must be resolveable
         NamingContext context = resolveFirstAsContext(impl,n);

         // Compute tail
         NameComponent[] tail = new NameComponent[n.length - 1];
         System.arraycopy(n,1,tail,0,n.length-1);

   // Propagate unbind to this context
         context.unbind(tail);
     }
 }