/** * Construct a new instance. A new, empty environment map is created for this context. */ protected AbstractContext() { this(new FastHashtable<>()); }
public static <K, V> FastHashtable<K, V> of(final Hashtable<K, V> other) { if (other instanceof FastHashtable) { return (FastHashtable<K, V>) other; } else { return new FastHashtable<>(other); } } }
/** * Construct a new instance. * * @throws NamingException if constructing the initial context fails */ public WildFlyInitialContext() throws NamingException { this(new FastHashtable<>()); }
public FastHashtable<K, V> clone() { return new FastHashtable<>(this); }
/** * Get a new initial context. * * @param environment the context environment * @return the initial context * @throws NamingException if constructing the initial context fails */ @SuppressWarnings({"rawtypes", "unchecked"}) public Context getInitialContext(final Hashtable<?, ?> environment) throws NamingException { return new WildFlyRootContext(new FastHashtable<>((Map<String, Object>) (Map) environment)); } }
/** * Construct a new instance. * * @param environment the initial environment * @throws NamingException if constructing the initial context fails */ @SuppressWarnings("unchecked") public WildFlyInitialContext(final Hashtable<?, ?> environment) throws NamingException { rootContext = new WildFlyRootContext(new FastHashtable<>((Hashtable<String, Object>) environment)); }
public HttpRemoteContext(HttpRootContext rootContext, String rootName) { this.rootContext = rootContext; this.rootName = rootName; try { this.environment = new FastHashtable<>(rootContext.getEnvironment()); } catch (NamingException e) { throw new RuntimeException(e); } }
protected Object lookupNative(final Name name) throws NamingException { if (name.isEmpty()) { return new RelativeContext(new FastHashtable<>(getEnvironment()), rootContext, prefix); } return rootContext.lookup(getAbsoluteName(name)); }
protected Object lookupNative(final Name name) throws NamingException { if (name.isEmpty()) { return new RelativeFederatingContext(new FastHashtable<>(getEnvironment()), rootContext, prefix); } return rootContext.lookup(decomposeName(getAbsoluteName(name))); }
protected Object lookupLinkNative(final Name name) throws NamingException { if (name.isEmpty()) { return new RelativeFederatingContext(new FastHashtable<>(getEnvironment()), rootContext, prefix); } return rootContext.lookupLink(decomposeName(getAbsoluteName(name))); }
protected Object lookupNative(final Name name) throws NamingException { final int size = name.size(); if (size < 3) { return new RelativeContext(new FastHashtable<>(getEnvironment()), this, SimpleName.of(name)); } else if (size > 4) { throw nameNotFound(name); if (size == 3) { return new RelativeContext(new FastHashtable<>(getEnvironment()), this, SimpleName.of(name));
final String relName = unmarshaller.readUTF(); prefix.add(relName); final RelativeFederatingContext context = new RelativeFederatingContext(new FastHashtable<String, Object>(remoteContext.getEnvironment()), remoteContext, prefix); results.add(new Binding(relName, context, true)); } else if (b == Protocol.P_BINDING) {
final int parameterType = is.readUnsignedByte(); if (parameterType == Protocol.P_CONTEXT) { return new RelativeFederatingContext(new FastHashtable<>(context.getEnvironment()), context, NamingUtils.toCompositeName(name)); } else if (parameterType == Protocol.P_OBJECT) { try (Unmarshaller unmarshaller = createUnmarshaller(is, configuration)) {
/** * Construct a new instance. * * @throws NamingException if constructing the initial context fails */ public WildFlyInitialContext() throws NamingException { this(new FastHashtable<>()); }
public static <K, V> FastHashtable<K, V> of(final Hashtable<K, V> other) { if (other instanceof FastHashtable) { return (FastHashtable<K, V>) other; } else { return new FastHashtable<>(other); } } }
/** * Construct a new instance. A new, empty environment map is created for this context. */ protected AbstractContext() { this(new FastHashtable<>()); }
/** * Construct a new instance. * * @param environment the initial environment * @throws NamingException if constructing the initial context fails */ @SuppressWarnings("unchecked") public WildFlyInitialContext(final Hashtable<?, ?> environment) throws NamingException { rootContext = new WildFlyRootContext(new FastHashtable<>((Hashtable<String, Object>) environment)); }
/** * Get a new initial context. * * @param environment the context environment * @return the initial context * @throws NamingException if constructing the initial context fails */ @SuppressWarnings({"rawtypes", "unchecked"}) public Context getInitialContext(final Hashtable<?, ?> environment) throws NamingException { return new WildFlyRootContext(new FastHashtable<>((Map<String, Object>) (Map) environment)); } }
protected Object lookupLinkNative(final Name name) throws NamingException { if (name.isEmpty()) { return new RelativeFederatingContext(new FastHashtable<>(getEnvironment()), rootContext, prefix); } return rootContext.lookupLink(decomposeName(getAbsoluteName(name))); }
protected Object lookupNative(final Name name) throws NamingException { if (name.isEmpty()) { return new RelativeFederatingContext(new FastHashtable<>(getEnvironment()), rootContext, prefix); } return rootContext.lookup(decomposeName(getAbsoluteName(name))); }