/** * This method is used by the iiop and iiopname URL Context factories. */ public static ResolveResult createUsingURL(String url, Hashtable env) throws NamingException { CNCtx ctx = new CNCtx(); if (env != null) { env = (Hashtable) env.clone(); } ctx._env = env; String rest = ctx.initUsingUrl(env != null ? (org.omg.CORBA.ORB) env.get("java.naming.corba.orb") : null, url, env); // rest is the INS name // Return the parsed form to prevent subsequent lookup // from parsing the string as a composite name // The caller should be aware that a toString() of the name // will yield its INS syntax, rather than a composite syntax return new ResolveResult(ctx, parser.parse(rest)); }
protected Object foundReferenceInsteadOfContext(final BindingNode bindingNode) throws NamingException { final Name remainingName = targetName.getSuffix(bindingNode.fullName.size()); final Object boundObject = bindingNode.binding.getObject(); checkReferenceForContinuation(remainingName, boundObject); return new ResolveResult(boundObject, remainingName); } }
return new ResolveResult(obj, suffix(lower, lookupName));
@Override protected ResolveResult createContext(String urlPrefix, String urlSuffix) throws NamingException { // get the default initial context, this should be the root (should already been initialized and not null) Context ctx = InitialContextFactoryImpl.getRootInitialContext(); if (urlSuffix.startsWith("comp/env/")) { urlSuffix = urlSuffix.substring("comp/env/".length()); } Name remainingName = NameParserImpl.DEFAULT.parse(urlSuffix); return new ResolveResult(ctx, remainingName); } }
/** * This method is used by the iiop and iiopname URL Context factories. */ public static ResolveResult createUsingURL(String url, Hashtable env) throws NamingException { CNCtx ctx = new CNCtx(); if (env != null) { env = (Hashtable) env.clone(); } ctx._env = env; String rest = ctx.initUsingUrl(env != null ? (org.omg.CORBA.ORB) env.get("java.naming.corba.orb") : null, url, env); // rest is the INS name // Return the parsed form to prevent subsequent lookup // from parsing the string as a composite name // The caller should be aware that a toString() of the name // will yield its INS syntax, rather than a composite syntax return new ResolveResult(ctx, parser.parse(rest)); }
/** * This method is used by the iiop and iiopname URL Context factories. */ public static ResolveResult createUsingURL(String url, Hashtable env) throws NamingException { CNCtx ctx = new CNCtx(); if (env != null) { env = (Hashtable) env.clone(); } ctx._env = env; String rest = ctx.initUsingUrl(env != null ? (org.omg.CORBA.ORB) env.get("java.naming.corba.orb") : null, url, env); // rest is the INS name // Return the parsed form to prevent subsequent lookup // from parsing the string as a composite name // The caller should be aware that a toString() of the name // will yield its INS syntax, rather than a composite syntax return new ResolveResult(ctx, parser.parse(rest)); }
protected Object foundReferenceInsteadOfContext(final BindingNode bindingNode) throws NamingException { final Name remainingName = targetName.getSuffix(bindingNode.fullName.size()); final Object boundObject = bindingNode.binding.getObject(); checkReferenceForContinuation(remainingName, boundObject); return new ResolveResult(boundObject, remainingName); } }
protected Object foundReferenceInsteadOfContext(final BindingNode bindingNode) throws NamingException { final Name remainingName = targetName.getSuffix(bindingNode.fullName.size()); final Object boundObject = bindingNode.binding.getObject(); checkReferenceForContinuation(remainingName, boundObject); return new ResolveResult(boundObject, remainingName); } }
/** * This method is used by the iiop and iiopname URL Context factories. */ @SuppressWarnings("unchecked") public static ResolveResult createUsingURL(String url, Hashtable<?,?> env) throws NamingException { CNCtx ctx = new CNCtx(); if (env != null) { env = (Hashtable<?,?>) env.clone(); } ctx._env = (Hashtable<String, java.lang.Object>)env; String rest = ctx.initUsingUrl( env != null ? (org.omg.CORBA.ORB) env.get("java.naming.corba.orb") : null, url, env); // rest is the INS name // Return the parsed form to prevent subsequent lookup // from parsing the string as a composite name // The caller should be aware that a toString() of the name, // which came from the environment will yield its INS syntax, // rather than a composite syntax return new ResolveResult(ctx, parser.parse(rest)); }
protected Object foundReferenceInsteadOfContext(final BindingNode bindingNode) throws NamingException { final Name remainingName = targetName.getSuffix(bindingNode.fullName.size()); final Object boundObject = bindingNode.binding.getObject(); checkReferenceForContinuation(remainingName, boundObject); return new ResolveResult(boundObject, remainingName); } }
protected Object foundReferenceInsteadOfContext(final BindingNode bindingNode) throws NamingException { final Name remainingName = targetName.getSuffix(bindingNode.fullName.size()); final Object boundObject = bindingNode.binding.getObject(); checkReferenceForContinuation(remainingName, boundObject); return new ResolveResult(boundObject, remainingName); } }
private ResolveResult findContextFor(String name) throws NamingException { String rname = getRelativeName(name); Context context = null; if (rname.equals("")) { // null name refers to this context context = new hascnURLContext(myEnv); } else { // other names are component independant context = namingFactory.getInitialContext(myEnv); } // Check context is not null to avoid nullPointerException if (context == null) { throw new NameNotFoundException("No context for this component"); } // Build a ResolveResult object to return ResolveResult r = new ResolveResult(context, rname); return r; }
private ResolveResult findContextFor(String name) throws NamingException { String rname = getRelativeName(name); Context context = null; if (rname.equals("")) { // null name refers to this context context = new scnURLContext(myEnv); } else { // other names are component independant context = namingFactory.getInitialContext(myEnv); } // Check context is not null to avoid nullPointerException if (context == null) { throw new NameNotFoundException("No context for this component"); } // Build a ResolveResult object to return ResolveResult r = new ResolveResult(context, rname); return r; }
ResolveResult r = new ResolveResult(context, rname); return r;
protected ResolveResult getBaseURLContext( final Name name, final Hashtable environment ) throws NamingException { if ( name.isEmpty() ) { throw new InvalidNameException( "Unable to locate URLContext will empty name" ); } final String nameString = name.get( 0 ).toString(); int index = nameString.indexOf( ':' ); if ( -1 == index ) { final String explanation = "Unable to build URLContext as it does not specify scheme"; throw new InvalidNameException( explanation ); } final String scheme = nameString.substring( 0, index ); final int end = getEndIndexOfURLPart( nameString, index + 1 ); final String urlPart = nameString.substring( index + 1, end ); final String namePart = nameString.substring( end ); if ( !m_scheme.equals( scheme ) ) { final String explanation = "Bad Scheme use to build URLContext (" + scheme + "). " + "Expected " + m_scheme; throw new InvalidNameException( explanation ); } final Context context = newContext( urlPart ); return new ResolveResult( context, new CompositeName( namePart ) ); }
return new ResolveResult(obj, suffix(lower, lookupName));
return new ResolveResult(obj, suffix(lower, lookupName));
return new ResolveResult(obj, suffix(lower, lookupName));
result = new ResolveResult(ctx, name.getSuffix(1)); } else