org.omg.CosNaming.BindingType Java Examples
The following examples show how to use
org.omg.CosNaming.BindingType.
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: TransientNamingContext.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * Binds the object to the name component as the specified binding type. * It creates a InternalBindingKey object and a InternalBindingValue * object and inserts them in the hash table. * @param n A single org.omg.CosNaming::NameComponent under which the * object will be bound. * @param obj An object reference to be bound under the supplied name. * @param bt The type of the binding (i.e., as object or as context). * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA * system exceptions. */ public final void Bind(NameComponent n, org.omg.CORBA.Object obj, BindingType bt) throws org.omg.CORBA.SystemException { // Create a key and a value InternalBindingKey key = new InternalBindingKey(n); NameComponent[] name = new NameComponent[1]; name[0] = n; Binding b = new Binding(name,bt); InternalBindingValue value = new InternalBindingValue(b,null); value.theObjectRef = obj; // insert it InternalBindingValue oldValue = (InternalBindingValue)this.theHashtable.put(key,value); if (oldValue != null) { updateLogger.warning( LogKeywords.NAMING_BIND + "Name " + getName( n ) + " Was Already Bound" ); throw wrapper.transNcBindAlreadyBound() ; } if( updateLogger.isLoggable( Level.FINE ) ) { updateLogger.fine( LogKeywords.NAMING_BIND_SUCCESS + "Name Component: " + n.id + "." + n.kind ); } }
Example #2
Source File: PersistentBindingIterator.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Returns the next binding in the NamingContext. Uses the enumeration * object to determine if there are more bindings and if so, returns * the next binding from the InternalBindingValue. * @param b The Binding as an out parameter. * @return true if there were more bindings. */ final public boolean NextOne(org.omg.CosNaming.BindingHolder b) { // If there are more elements get the next element boolean hasMore = theEnumeration.hasMoreElements(); if (hasMore) { InternalBindingKey theBindingKey = ((InternalBindingKey)theEnumeration.nextElement()); InternalBindingValue theElement = (InternalBindingValue)theHashtable.get( theBindingKey ); NameComponent n = new NameComponent( theBindingKey.id, theBindingKey.kind ); NameComponent[] nlist = new NameComponent[1]; nlist[0] = n; BindingType theType = theElement.theBindingType; b.value = new Binding( nlist, theType ); } else { // Return empty but marshalable binding b.value = new Binding(new NameComponent[0],BindingType.nobject); } return hasMore; }
Example #3
Source File: TransientNamingContext.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** * Binds the object to the name component as the specified binding type. * It creates a InternalBindingKey object and a InternalBindingValue * object and inserts them in the hash table. * @param n A single org.omg.CosNaming::NameComponent under which the * object will be bound. * @param obj An object reference to be bound under the supplied name. * @param bt The type of the binding (i.e., as object or as context). * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA * system exceptions. */ public final void Bind(NameComponent n, org.omg.CORBA.Object obj, BindingType bt) throws org.omg.CORBA.SystemException { // Create a key and a value InternalBindingKey key = new InternalBindingKey(n); NameComponent[] name = new NameComponent[1]; name[0] = n; Binding b = new Binding(name,bt); InternalBindingValue value = new InternalBindingValue(b,null); value.theObjectRef = obj; // insert it InternalBindingValue oldValue = (InternalBindingValue)this.theHashtable.put(key,value); if (oldValue != null) { updateLogger.warning( LogKeywords.NAMING_BIND + "Name " + getName( n ) + " Was Already Bound" ); throw wrapper.transNcBindAlreadyBound() ; } if( updateLogger.isLoggable( Level.FINE ) ) { updateLogger.fine( LogKeywords.NAMING_BIND_SUCCESS + "Name Component: " + n.id + "." + n.kind ); } }
Example #4
Source File: PersistentBindingIterator.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Returns the next binding in the NamingContext. Uses the enumeration * object to determine if there are more bindings and if so, returns * the next binding from the InternalBindingValue. * @param b The Binding as an out parameter. * @return true if there were more bindings. */ final public boolean NextOne(org.omg.CosNaming.BindingHolder b) { // If there are more elements get the next element boolean hasMore = theEnumeration.hasMoreElements(); if (hasMore) { InternalBindingKey theBindingKey = ((InternalBindingKey)theEnumeration.nextElement()); InternalBindingValue theElement = (InternalBindingValue)theHashtable.get( theBindingKey ); NameComponent n = new NameComponent( theBindingKey.id, theBindingKey.kind ); NameComponent[] nlist = new NameComponent[1]; nlist[0] = n; BindingType theType = theElement.theBindingType; b.value = new Binding( nlist, theType ); } else { // Return empty but marshalable binding b.value = new Binding(new NameComponent[0],BindingType.nobject); } return hasMore; }
Example #5
Source File: PersistentBindingIterator.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** * Returns the next binding in the NamingContext. Uses the enumeration * object to determine if there are more bindings and if so, returns * the next binding from the InternalBindingValue. * @param b The Binding as an out parameter. * @return true if there were more bindings. */ final public boolean NextOne(org.omg.CosNaming.BindingHolder b) { // If there are more elements get the next element boolean hasMore = theEnumeration.hasMoreElements(); if (hasMore) { InternalBindingKey theBindingKey = ((InternalBindingKey)theEnumeration.nextElement()); InternalBindingValue theElement = (InternalBindingValue)theHashtable.get( theBindingKey ); NameComponent n = new NameComponent( theBindingKey.id, theBindingKey.kind ); NameComponent[] nlist = new NameComponent[1]; nlist[0] = n; BindingType theType = theElement.theBindingType; b.value = new Binding( nlist, theType ); } else { // Return empty but marshalable binding b.value = new Binding(new NameComponent[0],BindingType.nobject); } return hasMore; }
Example #6
Source File: TransientNamingContext.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Binds the object to the name component as the specified binding type. * It creates a InternalBindingKey object and a InternalBindingValue * object and inserts them in the hash table. * @param n A single org.omg.CosNaming::NameComponent under which the * object will be bound. * @param obj An object reference to be bound under the supplied name. * @param bt The type of the binding (i.e., as object or as context). * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA * system exceptions. */ public final void Bind(NameComponent n, org.omg.CORBA.Object obj, BindingType bt) throws org.omg.CORBA.SystemException { // Create a key and a value InternalBindingKey key = new InternalBindingKey(n); NameComponent[] name = new NameComponent[1]; name[0] = n; Binding b = new Binding(name,bt); InternalBindingValue value = new InternalBindingValue(b,null); value.theObjectRef = obj; // insert it InternalBindingValue oldValue = (InternalBindingValue)this.theHashtable.put(key,value); if (oldValue != null) { updateLogger.warning( LogKeywords.NAMING_BIND + "Name " + getName( n ) + " Was Already Bound" ); throw wrapper.transNcBindAlreadyBound() ; } if( updateLogger.isLoggable( Level.FINE ) ) { updateLogger.fine( LogKeywords.NAMING_BIND_SUCCESS + "Name Component: " + n.id + "." + n.kind ); } }
Example #7
Source File: TransientNamingContext.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Binds the object to the name component as the specified binding type. * It creates a InternalBindingKey object and a InternalBindingValue * object and inserts them in the hash table. * @param n A single org.omg.CosNaming::NameComponent under which the * object will be bound. * @param obj An object reference to be bound under the supplied name. * @param bt The type of the binding (i.e., as object or as context). * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA * system exceptions. */ public final void Bind(NameComponent n, org.omg.CORBA.Object obj, BindingType bt) throws org.omg.CORBA.SystemException { // Create a key and a value InternalBindingKey key = new InternalBindingKey(n); NameComponent[] name = new NameComponent[1]; name[0] = n; Binding b = new Binding(name,bt); InternalBindingValue value = new InternalBindingValue(b,null); value.theObjectRef = obj; // insert it InternalBindingValue oldValue = (InternalBindingValue)this.theHashtable.put(key,value); if (oldValue != null) { updateLogger.warning( LogKeywords.NAMING_BIND + "Name " + getName( n ) + " Was Already Bound" ); throw wrapper.transNcBindAlreadyBound() ; } if( updateLogger.isLoggable( Level.FINE ) ) { updateLogger.fine( LogKeywords.NAMING_BIND_SUCCESS + "Name Component: " + n.id + "." + n.kind ); } }
Example #8
Source File: PersistentBindingIterator.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Returns the next binding in the NamingContext. Uses the enumeration * object to determine if there are more bindings and if so, returns * the next binding from the InternalBindingValue. * @param b The Binding as an out parameter. * @return true if there were more bindings. */ final public boolean NextOne(org.omg.CosNaming.BindingHolder b) { // If there are more elements get the next element boolean hasMore = theEnumeration.hasMoreElements(); if (hasMore) { InternalBindingKey theBindingKey = ((InternalBindingKey)theEnumeration.nextElement()); InternalBindingValue theElement = (InternalBindingValue)theHashtable.get( theBindingKey ); NameComponent n = new NameComponent( theBindingKey.id, theBindingKey.kind ); NameComponent[] nlist = new NameComponent[1]; nlist[0] = n; BindingType theType = theElement.theBindingType; b.value = new Binding( nlist, theType ); } else { // Return empty but marshalable binding b.value = new Binding(new NameComponent[0],BindingType.nobject); } return hasMore; }
Example #9
Source File: TransientNamingContext.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Binds the object to the name component as the specified binding type. * It creates a InternalBindingKey object and a InternalBindingValue * object and inserts them in the hash table. * @param n A single org.omg.CosNaming::NameComponent under which the * object will be bound. * @param obj An object reference to be bound under the supplied name. * @param bt The type of the binding (i.e., as object or as context). * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA * system exceptions. */ public final void Bind(NameComponent n, org.omg.CORBA.Object obj, BindingType bt) throws org.omg.CORBA.SystemException { // Create a key and a value InternalBindingKey key = new InternalBindingKey(n); NameComponent[] name = new NameComponent[1]; name[0] = n; Binding b = new Binding(name,bt); InternalBindingValue value = new InternalBindingValue(b,null); value.theObjectRef = obj; // insert it InternalBindingValue oldValue = (InternalBindingValue)this.theHashtable.put(key,value); if (oldValue != null) { updateLogger.warning( LogKeywords.NAMING_BIND + "Name " + getName( n ) + " Was Already Bound" ); throw wrapper.transNcBindAlreadyBound() ; } if( updateLogger.isLoggable( Level.FINE ) ) { updateLogger.fine( LogKeywords.NAMING_BIND_SUCCESS + "Name Component: " + n.id + "." + n.kind ); } }
Example #10
Source File: PersistentBindingIterator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Returns the next binding in the NamingContext. Uses the enumeration * object to determine if there are more bindings and if so, returns * the next binding from the InternalBindingValue. * @param b The Binding as an out parameter. * @return true if there were more bindings. */ final public boolean NextOne(org.omg.CosNaming.BindingHolder b) { // If there are more elements get the next element boolean hasMore = theEnumeration.hasMoreElements(); if (hasMore) { InternalBindingKey theBindingKey = ((InternalBindingKey)theEnumeration.nextElement()); InternalBindingValue theElement = (InternalBindingValue)theHashtable.get( theBindingKey ); NameComponent n = new NameComponent( theBindingKey.id, theBindingKey.kind ); NameComponent[] nlist = new NameComponent[1]; nlist[0] = n; BindingType theType = theElement.theBindingType; b.value = new Binding( nlist, theType ); } else { // Return empty but marshalable binding b.value = new Binding(new NameComponent[0],BindingType.nobject); } return hasMore; }
Example #11
Source File: TransientNamingContext.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Binds the object to the name component as the specified binding type. * It creates a InternalBindingKey object and a InternalBindingValue * object and inserts them in the hash table. * @param n A single org.omg.CosNaming::NameComponent under which the * object will be bound. * @param obj An object reference to be bound under the supplied name. * @param bt The type of the binding (i.e., as object or as context). * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA * system exceptions. */ public final void Bind(NameComponent n, org.omg.CORBA.Object obj, BindingType bt) throws org.omg.CORBA.SystemException { // Create a key and a value InternalBindingKey key = new InternalBindingKey(n); NameComponent[] name = new NameComponent[1]; name[0] = n; Binding b = new Binding(name,bt); InternalBindingValue value = new InternalBindingValue(b,null); value.theObjectRef = obj; // insert it InternalBindingValue oldValue = (InternalBindingValue)this.theHashtable.put(key,value); if (oldValue != null) { updateLogger.warning( LogKeywords.NAMING_BIND + "Name " + getName( n ) + " Was Already Bound" ); throw wrapper.transNcBindAlreadyBound() ; } if( updateLogger.isLoggable( Level.FINE ) ) { updateLogger.fine( LogKeywords.NAMING_BIND_SUCCESS + "Name Component: " + n.id + "." + n.kind ); } }
Example #12
Source File: TransientNamingContext.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Binds the object to the name component as the specified binding type. * It creates a InternalBindingKey object and a InternalBindingValue * object and inserts them in the hash table. * @param n A single org.omg.CosNaming::NameComponent under which the * object will be bound. * @param obj An object reference to be bound under the supplied name. * @param bt The type of the binding (i.e., as object or as context). * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA * system exceptions. */ public final void Bind(NameComponent n, org.omg.CORBA.Object obj, BindingType bt) throws org.omg.CORBA.SystemException { // Create a key and a value InternalBindingKey key = new InternalBindingKey(n); NameComponent[] name = new NameComponent[1]; name[0] = n; Binding b = new Binding(name,bt); InternalBindingValue value = new InternalBindingValue(b,null); value.theObjectRef = obj; // insert it InternalBindingValue oldValue = (InternalBindingValue)this.theHashtable.put(key,value); if (oldValue != null) { updateLogger.warning( LogKeywords.NAMING_BIND + "Name " + getName( n ) + " Was Already Bound" ); throw wrapper.transNcBindAlreadyBound() ; } if( updateLogger.isLoggable( Level.FINE ) ) { updateLogger.fine( LogKeywords.NAMING_BIND_SUCCESS + "Name Component: " + n.id + "." + n.kind ); } }
Example #13
Source File: PersistentBindingIterator.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Returns the next binding in the NamingContext. Uses the enumeration * object to determine if there are more bindings and if so, returns * the next binding from the InternalBindingValue. * @param b The Binding as an out parameter. * @return true if there were more bindings. */ final public boolean NextOne(org.omg.CosNaming.BindingHolder b) { // If there are more elements get the next element boolean hasMore = theEnumeration.hasMoreElements(); if (hasMore) { InternalBindingKey theBindingKey = ((InternalBindingKey)theEnumeration.nextElement()); InternalBindingValue theElement = (InternalBindingValue)theHashtable.get( theBindingKey ); NameComponent n = new NameComponent( theBindingKey.id, theBindingKey.kind ); NameComponent[] nlist = new NameComponent[1]; nlist[0] = n; BindingType theType = theElement.theBindingType; b.value = new Binding( nlist, theType ); } else { // Return empty but marshalable binding b.value = new Binding(new NameComponent[0],BindingType.nobject); } return hasMore; }
Example #14
Source File: TransientNamingContext.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Binds the object to the name component as the specified binding type. * It creates a InternalBindingKey object and a InternalBindingValue * object and inserts them in the hash table. * @param n A single org.omg.CosNaming::NameComponent under which the * object will be bound. * @param obj An object reference to be bound under the supplied name. * @param bt The type of the binding (i.e., as object or as context). * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA * system exceptions. */ public final void Bind(NameComponent n, org.omg.CORBA.Object obj, BindingType bt) throws org.omg.CORBA.SystemException { // Create a key and a value InternalBindingKey key = new InternalBindingKey(n); NameComponent[] name = new NameComponent[1]; name[0] = n; Binding b = new Binding(name,bt); InternalBindingValue value = new InternalBindingValue(b,null); value.theObjectRef = obj; // insert it InternalBindingValue oldValue = (InternalBindingValue)this.theHashtable.put(key,value); if (oldValue != null) { updateLogger.warning( LogKeywords.NAMING_BIND + "Name " + getName( n ) + " Was Already Bound" ); throw wrapper.transNcBindAlreadyBound() ; } if( updateLogger.isLoggable( Level.FINE ) ) { updateLogger.fine( LogKeywords.NAMING_BIND_SUCCESS + "Name Component: " + n.id + "." + n.kind ); } }
Example #15
Source File: TransientNamingContext.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Binds the object to the name component as the specified binding type. * It creates a InternalBindingKey object and a InternalBindingValue * object and inserts them in the hash table. * @param n A single org.omg.CosNaming::NameComponent under which the * object will be bound. * @param obj An object reference to be bound under the supplied name. * @param bt The type of the binding (i.e., as object or as context). * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA * system exceptions. */ public final void Bind(NameComponent n, org.omg.CORBA.Object obj, BindingType bt) throws org.omg.CORBA.SystemException { // Create a key and a value InternalBindingKey key = new InternalBindingKey(n); NameComponent[] name = new NameComponent[1]; name[0] = n; Binding b = new Binding(name,bt); InternalBindingValue value = new InternalBindingValue(b,null); value.theObjectRef = obj; // insert it InternalBindingValue oldValue = (InternalBindingValue)this.theHashtable.put(key,value); if (oldValue != null) { updateLogger.warning( LogKeywords.NAMING_BIND + "Name " + getName( n ) + " Was Already Bound" ); throw wrapper.transNcBindAlreadyBound() ; } if( updateLogger.isLoggable( Level.FINE ) ) { updateLogger.fine( LogKeywords.NAMING_BIND_SUCCESS + "Name Component: " + n.id + "." + n.kind ); } }
Example #16
Source File: PersistentBindingIterator.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Returns the next binding in the NamingContext. Uses the enumeration * object to determine if there are more bindings and if so, returns * the next binding from the InternalBindingValue. * @param b The Binding as an out parameter. * @return true if there were more bindings. */ final public boolean NextOne(org.omg.CosNaming.BindingHolder b) { // If there are more elements get the next element boolean hasMore = theEnumeration.hasMoreElements(); if (hasMore) { InternalBindingKey theBindingKey = ((InternalBindingKey)theEnumeration.nextElement()); InternalBindingValue theElement = (InternalBindingValue)theHashtable.get( theBindingKey ); NameComponent n = new NameComponent( theBindingKey.id, theBindingKey.kind ); NameComponent[] nlist = new NameComponent[1]; nlist[0] = n; BindingType theType = theElement.theBindingType; b.value = new Binding( nlist, theType ); } else { // Return empty but marshalable binding b.value = new Binding(new NameComponent[0],BindingType.nobject); } return hasMore; }
Example #17
Source File: TransientNamingContext.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Binds the object to the name component as the specified binding type. * It creates a InternalBindingKey object and a InternalBindingValue * object and inserts them in the hash table. * @param n A single org.omg.CosNaming::NameComponent under which the * object will be bound. * @param obj An object reference to be bound under the supplied name. * @param bt The type of the binding (i.e., as object or as context). * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA * system exceptions. */ public final void Bind(NameComponent n, org.omg.CORBA.Object obj, BindingType bt) throws org.omg.CORBA.SystemException { // Create a key and a value InternalBindingKey key = new InternalBindingKey(n); NameComponent[] name = new NameComponent[1]; name[0] = n; Binding b = new Binding(name,bt); InternalBindingValue value = new InternalBindingValue(b,null); value.theObjectRef = obj; // insert it InternalBindingValue oldValue = (InternalBindingValue)this.theHashtable.put(key,value); if (oldValue != null) { updateLogger.warning( LogKeywords.NAMING_BIND + "Name " + getName( n ) + " Was Already Bound" ); throw wrapper.transNcBindAlreadyBound() ; } if( updateLogger.isLoggable( Level.FINE ) ) { updateLogger.fine( LogKeywords.NAMING_BIND_SUCCESS + "Name Component: " + n.id + "." + n.kind ); } }
Example #18
Source File: PersistentBindingIterator.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * Returns the next binding in the NamingContext. Uses the enumeration * object to determine if there are more bindings and if so, returns * the next binding from the InternalBindingValue. * @param b The Binding as an out parameter. * @return true if there were more bindings. */ final public boolean NextOne(org.omg.CosNaming.BindingHolder b) { // If there are more elements get the next element boolean hasMore = theEnumeration.hasMoreElements(); if (hasMore) { InternalBindingKey theBindingKey = ((InternalBindingKey)theEnumeration.nextElement()); InternalBindingValue theElement = (InternalBindingValue)theHashtable.get( theBindingKey ); NameComponent n = new NameComponent( theBindingKey.id, theBindingKey.kind ); NameComponent[] nlist = new NameComponent[1]; nlist[0] = n; BindingType theType = theElement.theBindingType; b.value = new Binding( nlist, theType ); } else { // Return empty but marshalable binding b.value = new Binding(new NameComponent[0],BindingType.nobject); } return hasMore; }
Example #19
Source File: NamingContextImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Implements resolving a NameComponent in this context and * narrowing it to CosNaming::NamingContext. It will throw appropriate * exceptions if not found or not narrowable. * @param impl an implementation of NamingContextDataStore * @param n a NameComponents which is the name to be found. * @exception org.omg.CosNaming.NamingContextPackage.NotFound The * first component could not be resolved. * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Could not proceed * in resolving the first component of the supplied name. * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA system exceptions. * @see resolve */ protected static NamingContext resolveFirstAsContext(NamingContextDataStore impl, NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound { org.omg.CORBA.Object topRef = null; BindingTypeHolder bth = new BindingTypeHolder(); NamingContext context = null; synchronized (impl) { // Resolve first - must be resolveable topRef = impl.Resolve(n[0],bth); if (topRef == null) { // It was not bound throw new NotFound(NotFoundReason.missing_node,n); } } // Was it bound as a context? if (bth.value != BindingType.ncontext) { // It was not a context throw new NotFound(NotFoundReason.not_context,n); } // Narrow to a naming context try { context = NamingContextHelper.narrow(topRef); } catch (org.omg.CORBA.BAD_PARAM ex) { // It was not a context throw new NotFound(NotFoundReason.not_context,n); } // Hmm. must be ok return context; }
Example #20
Source File: NamingContextImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Implements resolving a NameComponent in this context and * narrowing it to CosNaming::NamingContext. It will throw appropriate * exceptions if not found or not narrowable. * @param impl an implementation of NamingContextDataStore * @param n a NameComponents which is the name to be found. * @exception org.omg.CosNaming.NamingContextPackage.NotFound The * first component could not be resolved. * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Could not proceed * in resolving the first component of the supplied name. * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA system exceptions. * @see resolve */ protected static NamingContext resolveFirstAsContext(NamingContextDataStore impl, NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound { org.omg.CORBA.Object topRef = null; BindingTypeHolder bth = new BindingTypeHolder(); NamingContext context = null; synchronized (impl) { // Resolve first - must be resolveable topRef = impl.Resolve(n[0],bth); if (topRef == null) { // It was not bound throw new NotFound(NotFoundReason.missing_node,n); } } // Was it bound as a context? if (bth.value != BindingType.ncontext) { // It was not a context throw new NotFound(NotFoundReason.not_context,n); } // Narrow to a naming context try { context = NamingContextHelper.narrow(topRef); } catch (org.omg.CORBA.BAD_PARAM ex) { // It was not a context throw new NotFound(NotFoundReason.not_context,n); } // Hmm. must be ok return context; }
Example #21
Source File: NamingContextImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Bind a NamingContext under a name in this NamingContext. If the name * contains multiple (n) components, the first n-1 components will be * resolved in this NamingContext and the object bound in resulting * NamingContext. If a binding under the supplied name already exists it * will be unbound first. The NamingContext will participate in recursive * resolving. * @param n a sequence of NameComponents which is the name under which * the object will be bound. * @param obj the object reference to be bound. * @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 doBind */ public void rebind_context(NameComponent[] n, NamingContext nc) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName { if( nc == null ) { updateLogger.warning( LogKeywords.NAMING_REBIND_FAILURE + " NULL Context cannot be Bound " ); throw wrapper.objectIsNull() ; } try { // doBind implements all four flavors of binding NamingContextDataStore impl = (NamingContextDataStore)this; doBind(impl,n,nc,true,BindingType.ncontext); } catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound ex) { // This should not happen updateLogger.warning( LogKeywords.NAMING_REBIND_FAILURE + NamingUtils.getDirectoryStructuredName( n ) + " is already bound to a CORBA Object" ); throw wrapper.namingCtxRebindctxAlreadyBound( ex ) ; } 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_REBIND_SUCCESS + " Name = " + NamingUtils.getDirectoryStructuredName( n ) ); } }
Example #22
Source File: NamingContextImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Bind an object under a name in this NamingContext. If the name * contains multiple (n) components, n-1 will be resolved in this * NamingContext and the object bound in resulting NamingContext. * If a binding under the supplied name already exists it will be * unbound first. If the * object to be bound is a NamingContext it will not participate in * a recursive resolve. * @param n a sequence of NameComponents which is the name under which * the object will be bound. * @param obj the object reference to be bound. * @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 doBind */ public void rebind(NameComponent[] n, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName { if( obj == null ) { updateLogger.warning( LogKeywords.NAMING_REBIND_FAILURE + " NULL Object cannot be Bound " ); throw wrapper.objectIsNull() ; } try { // doBind implements all four flavors of binding NamingContextDataStore impl = (NamingContextDataStore)this; doBind(impl,n,obj,true,BindingType.nobject); } catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound ex) { updateLogger.warning( LogKeywords.NAMING_REBIND_FAILURE + NamingUtils.getDirectoryStructuredName( n ) + " is already bound to a Naming Context" ); // This should not happen throw wrapper.namingCtxRebindAlreadyBound( ex ) ; } 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_REBIND_SUCCESS + " Name = " + NamingUtils.getDirectoryStructuredName( n ) ); } }
Example #23
Source File: TransientBindingIterator.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Returns the next binding in the NamingContext. Uses the enumeration * object to determine if there are more bindings and if so, returns * the next binding from the InternalBindingValue. * @param b The Binding as an out parameter. * @return true if there were more bindings. */ final public boolean NextOne(org.omg.CosNaming.BindingHolder b) { // If there are more elements get the next element boolean hasMore = theEnumeration.hasMoreElements(); if (hasMore) { b.value = ((InternalBindingValue)theEnumeration.nextElement()).theBinding; currentSize--; } else { // Return empty but marshalable binding b.value = new Binding(new NameComponent[0],BindingType.nobject); } return hasMore; }
Example #24
Source File: NamingContextImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Implements resolving a NameComponent in this context and * narrowing it to CosNaming::NamingContext. It will throw appropriate * exceptions if not found or not narrowable. * @param impl an implementation of NamingContextDataStore * @param n a NameComponents which is the name to be found. * @exception org.omg.CosNaming.NamingContextPackage.NotFound The * first component could not be resolved. * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Could not proceed * in resolving the first component of the supplied name. * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA system exceptions. * @see resolve */ protected static NamingContext resolveFirstAsContext(NamingContextDataStore impl, NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound { org.omg.CORBA.Object topRef = null; BindingTypeHolder bth = new BindingTypeHolder(); NamingContext context = null; synchronized (impl) { // Resolve first - must be resolveable topRef = impl.Resolve(n[0],bth); if (topRef == null) { // It was not bound throw new NotFound(NotFoundReason.missing_node,n); } } // Was it bound as a context? if (bth.value != BindingType.ncontext) { // It was not a context throw new NotFound(NotFoundReason.not_context,n); } // Narrow to a naming context try { context = NamingContextHelper.narrow(topRef); } catch (org.omg.CORBA.BAD_PARAM ex) { // It was not a context throw new NotFound(NotFoundReason.not_context,n); } // Hmm. must be ok return context; }
Example #25
Source File: NamingContextImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Implements resolving a NameComponent in this context and * narrowing it to CosNaming::NamingContext. It will throw appropriate * exceptions if not found or not narrowable. * @param impl an implementation of NamingContextDataStore * @param n a NameComponents which is the name to be found. * @exception org.omg.CosNaming.NamingContextPackage.NotFound The * first component could not be resolved. * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Could not proceed * in resolving the first component of the supplied name. * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA system exceptions. * @see resolve */ protected static NamingContext resolveFirstAsContext(NamingContextDataStore impl, NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound { org.omg.CORBA.Object topRef = null; BindingTypeHolder bth = new BindingTypeHolder(); NamingContext context = null; synchronized (impl) { // Resolve first - must be resolveable topRef = impl.Resolve(n[0],bth); if (topRef == null) { // It was not bound throw new NotFound(NotFoundReason.missing_node,n); } } // Was it bound as a context? if (bth.value != BindingType.ncontext) { // It was not a context throw new NotFound(NotFoundReason.not_context,n); } // Narrow to a naming context try { context = NamingContextHelper.narrow(topRef); } catch (org.omg.CORBA.BAD_PARAM ex) { // It was not a context throw new NotFound(NotFoundReason.not_context,n); } // Hmm. must be ok return context; }
Example #26
Source File: TransientBindingIterator.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Returns the next binding in the NamingContext. Uses the enumeration * object to determine if there are more bindings and if so, returns * the next binding from the InternalBindingValue. * @param b The Binding as an out parameter. * @return true if there were more bindings. */ final public boolean NextOne(org.omg.CosNaming.BindingHolder b) { // If there are more elements get the next element boolean hasMore = theEnumeration.hasMoreElements(); if (hasMore) { b.value = ((InternalBindingValue)theEnumeration.nextElement()).theBinding; currentSize--; } else { // Return empty but marshalable binding b.value = new Binding(new NameComponent[0],BindingType.nobject); } return hasMore; }
Example #27
Source File: NamingContextImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Bind a NamingContext under a name in this NamingContext. If the name * contains multiple (n) components, the first n-1 components will be * resolved in this NamingContext and the object bound in resulting * NamingContext. If a binding under the supplied name already exists it * will be unbound first. The NamingContext will participate in recursive * resolving. * @param n a sequence of NameComponents which is the name under which * the object will be bound. * @param obj the object reference to be bound. * @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 doBind */ public void rebind_context(NameComponent[] n, NamingContext nc) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName { if( nc == null ) { updateLogger.warning( LogKeywords.NAMING_REBIND_FAILURE + " NULL Context cannot be Bound " ); throw wrapper.objectIsNull() ; } try { // doBind implements all four flavors of binding NamingContextDataStore impl = (NamingContextDataStore)this; doBind(impl,n,nc,true,BindingType.ncontext); } catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound ex) { // This should not happen updateLogger.warning( LogKeywords.NAMING_REBIND_FAILURE + NamingUtils.getDirectoryStructuredName( n ) + " is already bound to a CORBA Object" ); throw wrapper.namingCtxRebindctxAlreadyBound( ex ) ; } 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_REBIND_SUCCESS + " Name = " + NamingUtils.getDirectoryStructuredName( n ) ); } }
Example #28
Source File: NamingContextImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Bind an object under a name in this NamingContext. If the name * contains multiple (n) components, n-1 will be resolved in this * NamingContext and the object bound in resulting NamingContext. * If a binding under the supplied name already exists it will be * unbound first. If the * object to be bound is a NamingContext it will not participate in * a recursive resolve. * @param n a sequence of NameComponents which is the name under which * the object will be bound. * @param obj the object reference to be bound. * @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 doBind */ public void rebind(NameComponent[] n, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName { if( obj == null ) { updateLogger.warning( LogKeywords.NAMING_REBIND_FAILURE + " NULL Object cannot be Bound " ); throw wrapper.objectIsNull() ; } try { // doBind implements all four flavors of binding NamingContextDataStore impl = (NamingContextDataStore)this; doBind(impl,n,obj,true,BindingType.nobject); } catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound ex) { updateLogger.warning( LogKeywords.NAMING_REBIND_FAILURE + NamingUtils.getDirectoryStructuredName( n ) + " is already bound to a Naming Context" ); // This should not happen throw wrapper.namingCtxRebindAlreadyBound( ex ) ; } 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_REBIND_SUCCESS + " Name = " + NamingUtils.getDirectoryStructuredName( n ) ); } }
Example #29
Source File: NamingContextImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Bind an object under a name in this NamingContext. If the name * contains multiple (n) components, n-1 will be resolved in this * NamingContext and the object bound in resulting NamingContext. * If a binding under the supplied name already exists it will be * unbound first. If the * object to be bound is a NamingContext it will not participate in * a recursive resolve. * @param n a sequence of NameComponents which is the name under which * the object will be bound. * @param obj the object reference to be bound. * @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 doBind */ public void rebind(NameComponent[] n, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName { if( obj == null ) { updateLogger.warning( LogKeywords.NAMING_REBIND_FAILURE + " NULL Object cannot be Bound " ); throw wrapper.objectIsNull() ; } try { // doBind implements all four flavors of binding NamingContextDataStore impl = (NamingContextDataStore)this; doBind(impl,n,obj,true,BindingType.nobject); } catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound ex) { updateLogger.warning( LogKeywords.NAMING_REBIND_FAILURE + NamingUtils.getDirectoryStructuredName( n ) + " is already bound to a Naming Context" ); // This should not happen throw wrapper.namingCtxRebindAlreadyBound( ex ) ; } 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_REBIND_SUCCESS + " Name = " + NamingUtils.getDirectoryStructuredName( n ) ); } }
Example #30
Source File: NamingContextImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Bind a NamingContext under a name in this NamingContext. If the name * contains multiple (n) components, the first n-1 components will be * resolved in this NamingContext and the object bound in resulting * NamingContext. If a binding under the supplied name already exists it * will be unbound first. The NamingContext will participate in recursive * resolving. * @param n a sequence of NameComponents which is the name under which * the object will be bound. * @param obj the object reference to be bound. * @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 doBind */ public void rebind_context(NameComponent[] n, NamingContext nc) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName { if( nc == null ) { updateLogger.warning( LogKeywords.NAMING_REBIND_FAILURE + " NULL Context cannot be Bound " ); throw wrapper.objectIsNull() ; } try { // doBind implements all four flavors of binding NamingContextDataStore impl = (NamingContextDataStore)this; doBind(impl,n,nc,true,BindingType.ncontext); } catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound ex) { // This should not happen updateLogger.warning( LogKeywords.NAMING_REBIND_FAILURE + NamingUtils.getDirectoryStructuredName( n ) + " is already bound to a CORBA Object" ); throw wrapper.namingCtxRebindctxAlreadyBound( ex ) ; } 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_REBIND_SUCCESS + " Name = " + NamingUtils.getDirectoryStructuredName( n ) ); } }