/** Add a form encoded HTTP Method * @param method HTTP Method of requests that can be decoded as * x-www-form-urlencoded content to be made available via the * {@link Request#getParameter(String)} and associated APIs */ public void addFormEncodedMethod(String method) { _formEncodedMethods.put(method,Boolean.TRUE); }
/** * Adds a form encoded HTTP Method * * @param method the HTTP method of requests that can be decoded as * {@code x-www-form-urlencoded} content to be made available via the * {@link Request#getParameter(String)} and associated APIs */ public void addFormEncodedMethod(String method) { _formEncodedMethods.put(method,Boolean.TRUE); }
public ContextRoutingHandler(Map<String, ? extends Handler> handlers) { this.handlers = new ArrayTernaryTrie<>(false); for (Map.Entry<String, ? extends Handler> entry : handlers.entrySet()) { if (!this.handlers.put(entry.getKey(), entry.getValue())) { throw new IllegalStateException("Too many handlers"); } addBean(entry.getValue()); } }
/** Create a configuration from another. * @param config The configuration to copy. */ public HttpConfiguration(HttpConfiguration config) { _customizers.addAll(config._customizers); for (String s:config._formEncodedMethods.keySet()) _formEncodedMethods.put(s,Boolean.TRUE); _outputBufferSize=config._outputBufferSize; _outputAggregationSize=config._outputAggregationSize; _requestHeaderSize=config._requestHeaderSize; _responseHeaderSize=config._responseHeaderSize; _headerCacheSize=config._headerCacheSize; _secureScheme=config._secureScheme; _securePort=config._securePort; _blockingTimeout=config._blockingTimeout; _sendDateHeader=config._sendDateHeader; _sendServerVersion=config._sendServerVersion; _sendXPoweredBy=config._sendXPoweredBy; _delayDispatchUntilContent=config._delayDispatchUntilContent; _persistentConnectionsEnabled=config._persistentConnectionsEnabled; _maxErrorDispatches=config._maxErrorDispatches; }
_formEncodedMethods.put(s,Boolean.TRUE); _outputBufferSize=config._outputBufferSize; _outputAggregationSize=config._outputAggregationSize;
public boolean put(PathSpec pathSpec, E resource) { MappedResource<E> entry = new MappedResource<>(pathSpec,resource); switch (pathSpec.group) { case EXACT: String exact = pathSpec.getPrefix(); while (exact!=null && !_exactMap.put(exact,entry)) _exactMap=new ArrayTernaryTrie<>((ArrayTernaryTrie<MappedResource<E>>)_exactMap,1.5); break; case PREFIX_GLOB: String prefix = pathSpec.getPrefix(); while (prefix!=null && !_prefixMap.put(prefix,entry)) _prefixMap=new ArrayTernaryTrie<>((ArrayTernaryTrie<MappedResource<E>>)_prefixMap,1.5); break; case SUFFIX_GLOB: String suffix = pathSpec.getSuffix(); while (suffix!=null && !_suffixMap.put(suffix,entry)) _suffixMap=new ArrayTernaryTrie<>((ArrayTernaryTrie<MappedResource<E>>)_prefixMap,1.5); break; default: } boolean added =_mappings.add(entry); if (LOG.isDebugEnabled()) LOG.debug("{} {} to {}",added?"Added":"Ignored",entry,this); return added; }
public boolean put(PathSpec pathSpec, E resource) { MappedResource<E> entry = new MappedResource<>(pathSpec,resource); switch (pathSpec.group) { case EXACT: String exact = pathSpec.getPrefix(); while (exact!=null && !_exactMap.put(exact,entry)) _exactMap=new ArrayTernaryTrie<>((ArrayTernaryTrie<MappedResource<E>>)_exactMap,1.5); break; case PREFIX_GLOB: String prefix = pathSpec.getPrefix(); while (prefix!=null && !_prefixMap.put(prefix,entry)) _prefixMap=new ArrayTernaryTrie<>((ArrayTernaryTrie<MappedResource<E>>)_prefixMap,1.5); break; case SUFFIX_GLOB: String suffix = pathSpec.getSuffix(); while (suffix!=null && !_suffixMap.put(suffix,entry)) _suffixMap=new ArrayTernaryTrie<>((ArrayTernaryTrie<MappedResource<E>>)_prefixMap,1.5); break; default: } boolean added =_mappings.add(entry); if (LOG.isDebugEnabled()) LOG.debug("{} {} to {}",added?"Added":"Ignored",entry,this); return added; }
for (Map.Entry<String,Branch[]> entry: map.entrySet()) if (!trie.put(entry.getKey().substring(1),entry))
for (Map.Entry<String,Branch[]> entry: map.entrySet()) if (!trie.put(entry.getKey().substring(1),entry))
for (Map.Entry<String,Branch[]> entry: map.entrySet()) if (!trie.put(entry.getKey().substring(1),entry))
_connectionFields.put(_field);
_connectionFields.put(_field);
_fieldCache.put(_field);
_connectionFields.put(_field);