public final class MessageContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DST_DEVICE
a predefined key to find the destination device
for the current packet-in, if applicable.
|
static java.lang.String |
ETHER_PAYLOAD
a predefined key for the Ethernet payload.
|
static java.lang.String |
ROUTING_DECISION
a predefined key for the Routing Decisions.
|
static java.lang.String |
SRC_DEVICE
a predefined key to find the source device
for the current packet-in, if applicable.
|
private java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.Object> |
storage
Internal representation of the message context storage.
|
Constructor and Description |
---|
MessageContext() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.String key)
retrieve an object saved with the given key
|
java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.Object> |
getStorage()
Return the actual storage associated with the message context.
|
void |
put(java.lang.String key,
java.lang.Object value)
Put something in the message context with given key.
|
private java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.Object> storage
public static final java.lang.String ETHER_PAYLOAD
public static final java.lang.String ROUTING_DECISION
public static final java.lang.String SRC_DEVICE
public static final java.lang.String DST_DEVICE
public java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.Object> getStorage()
public java.lang.Object get(java.lang.String key)
key
- value that uniquely identifies an item saved in the message contextpublic void put(java.lang.String key, java.lang.Object value)
key
- value that uniquely identifies an item saved in the message contextvalue
- value that is saved in the message context