public NamingContext new_context() { try { // create and initialize a new context. CorbaNamingContext newContextImpl = new CorbaNamingContext(); newContextImpl.init(this.poa, this.doPurge, this.noPing); // create the oid for the new context and activate it with the naming service POA. String oid = new String(this.poa.servant_to_id(this), StandardCharsets.UTF_8) + "/ctx" + (++this.childCount); this.poa.activate_object_with_id(oid.getBytes(StandardCharsets.UTF_8), newContextImpl); // add the newly-created context to the cache. contextImpls.put(oid, newContextImpl); return NamingContextExtHelper.narrow(this.poa.create_reference_with_id(oid.getBytes(StandardCharsets.UTF_8), "IDL:omg.org/CosNaming/NamingContextExt:1.0")); } catch (Exception e) { IIOPLogger.ROOT_LOGGER.failedToCreateNamingContext(e); return null; } }
public void _read (final org.omg.CORBA.portable.InputStream in) { value = NamingContextExtHelper.read (in); } public void _write (final org.omg.CORBA.portable.OutputStream _out)
public void _write (final org.omg.CORBA.portable.OutputStream _out) { NamingContextExtHelper.write (_out,value); } }
public org.omg.CORBA.TypeCode _type() { return NamingContextExtHelper.type(); } public void _read (final org.omg.CORBA.portable.InputStream in)
synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.omg.CosNaming.NamingContextExtHelper.id (), "NamingContextExt"); } return __typeCode; }
public void _read (final org.omg.CORBA.portable.InputStream in) { value = NamingContextExtHelper.read (in); } public void _write (final org.omg.CORBA.portable.OutputStream _out)
public void _write (final org.omg.CORBA.portable.OutputStream _out) { NamingContextExtHelper.write (_out,value); } }
public org.omg.CORBA.TypeCode _type () { return org.omg.CosNaming.NamingContextExtHelper.type (); }
synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.omg.CosNaming.NamingContextExtHelper.id (), "NamingContextExt"); } return __typeCode; }
public org.omg.CORBA.Object resolve(NameComponent[] nc) throws NotFound, CannotProceed, InvalidName { if (this.destroyed) throw new CannotProceed(); if (nc == null || nc.length == 0) throw new InvalidName(); Name n = new Name(nc[0]); if (nc.length > 1) { org.omg.CORBA.Object next_context = (org.omg.CORBA.Object) this.contexts.get(n); if ((next_context == null) || (isDead(next_context))) throw new NotFound(NotFoundReason.missing_node, nc); NameComponent[] nc_prime = new NameComponent[nc.length - 1]; System.arraycopy(nc, 1, nc_prime, 0, nc_prime.length); // try first to call the context implementation object directly. String contextOID = this.getObjectOID(next_context); CorbaNamingContext jbossContext = (contextOID == null ? null : contextImpls.get(contextOID)); if (jbossContext != null) return jbossContext.resolve(nc_prime); else return NamingContextExtHelper.narrow(next_context).resolve(nc_prime); } else { org.omg.CORBA.Object result = (org.omg.CORBA.Object) this.contexts.get(n); if (result == null) result = (org.omg.CORBA.Object) this.names.get(n); if (result == null) throw new NotFound(NotFoundReason.missing_node, n.components()); if (!noPing && isDead(result)) throw new NotFound(NotFoundReason.missing_node, n.components()); return result; } }
public void _read (org.omg.CORBA.portable.InputStream i) { value = org.omg.CosNaming.NamingContextExtHelper.read (i); }
public void _write (org.omg.CORBA.portable.OutputStream o) { org.omg.CosNaming.NamingContextExtHelper.write (o, value); }
public org.omg.CORBA.TypeCode _type() { return NamingContextExtHelper.type(); } public void _read (final org.omg.CORBA.portable.InputStream in)
public static org.omg.CosNaming.NamingContextExt narrow (org.omg.CORBA.Object obj) { if (obj == null) return null; else if (obj instanceof org.omg.CosNaming.NamingContextExt) return (org.omg.CosNaming.NamingContextExt)obj; else if (!obj._is_a (id ())) throw new org.omg.CORBA.BAD_PARAM (); else { org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); org.omg.CosNaming._NamingContextExtStub stub = new org.omg.CosNaming._NamingContextExtStub (); stub._set_delegate(delegate); return stub; } }
jbossContext.rebind(ncx, obj); else NamingContextExtHelper.narrow(context).rebind(ncx, obj);
public void _read (org.omg.CORBA.portable.InputStream i) { value = org.omg.CosNaming.NamingContextExtHelper.read (i); }
public void _write (org.omg.CORBA.portable.OutputStream o) { org.omg.CosNaming.NamingContextExtHelper.write (o, value); }
public org.omg.CORBA.TypeCode _type () { return org.omg.CosNaming.NamingContextExtHelper.type (); }