public class ResponseContext extends AbstractMap<String,Object>
Packet
.
This class creates a read-only Map
view that
gets exposed to client applications after an invocation
is complete.
The design goal of this class is to make it efficient
to create a new ResponseContext
, at the expense
of making some Map
operations slower. This is
justified because the response context is mostly just
used to query a few known values, and operations like
enumeration isn't likely.
Some of the Map
methods requre this class to
build the complete Set
of properties, but we
try to avoid that as much as possible.
TODO: are we exposing all strongly-typed fields, or do they have appliation/handler scope notion?
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
ResponseContext(Packet packet) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
Set<Map.Entry<String,Object>> |
entrySet() |
Object |
get(Object key) |
Object |
put(String key,
Object value) |
void |
putAll(Map<? extends String,? extends Object> t) |
Object |
remove(Object key) |
clone, containsValue, equals, hashCode, isEmpty, keySet, size, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public boolean containsKey(Object key)
containsKey
in interface Map<String,Object>
containsKey
in class AbstractMap<String,Object>
public void clear()
Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.