public static class ExecutionContext.ApplicationData
extends java.lang.Object
ExecutionContext
.
The application data format is key-value pairs of
String
s.
This application data is provided by the client initiating the execution, it is then transported as is over the wire and is available for the provider-side service implementations on the server. This extra data is completely opaque for the infrastructure, in other words it is a contract between the client and the service implementation only.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
USER_AGENT_KEY
ApplicationData property key for user agent. |
Constructor and Description |
---|
ExecutionContext.ApplicationData()
Constructs an empty instance.
|
ExecutionContext.ApplicationData(java.util.Map<java.lang.String,java.lang.String> data)
Constructs an instance with the specified data as a source.
|
ExecutionContext.ApplicationData(java.lang.String key,
java.lang.String value)
Constructs an instance with a single property only.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
getAllProperties() |
java.lang.String |
getProperty(java.lang.String key) |
static ExecutionContext.ApplicationData |
merge(ExecutionContext.ApplicationData source,
java.util.Map<java.lang.String,java.lang.String> data)
Merges the specified
source and data into a newly
created ApplicationData instance. |
static ExecutionContext.ApplicationData |
merge(ExecutionContext.ApplicationData source,
java.lang.String key,
java.lang.String value)
Merges the specified
source and property into a newly created
ApplicationData instance. |
public static final java.lang.String USER_AGENT_KEY
ApplicationData
property key for user agent.public ExecutionContext.ApplicationData()
public ExecutionContext.ApplicationData(java.util.Map<java.lang.String,java.lang.String> data)
data
- key-value entriesjava.lang.NullPointerException
- if data
is
null
public ExecutionContext.ApplicationData(java.lang.String key, java.lang.String value)
key
- the key of the propertyvalue
- the value of the propertypublic java.lang.String getProperty(java.lang.String key)
key
- of the propertykey
or
null
if it is unavailablepublic java.util.Map<java.lang.String,java.lang.String> getAllProperties()
Map
representing all the
properties; cannot be null
public static ExecutionContext.ApplicationData merge(ExecutionContext.ApplicationData source, java.util.Map<java.lang.String,java.lang.String> data)
source
and data
into a newly
created ApplicationData
instance. Any conflicts are resolved
in favor of the specified data
.source
- the source of data; may be null
data
- a collection of properties to merge with the
source
ApplicationData
combining the
specified source
and data
java.lang.NullPointerException
- if data
is
null
public static ExecutionContext.ApplicationData merge(ExecutionContext.ApplicationData source, java.lang.String key, java.lang.String value)
source
and property into a newly created
ApplicationData
instance. The specified value
will
override the previous one, if a property with the specified
key
is already present in the source
.source
- the source of data; may be null
key
- the key of the property to merge with the source
value
- the value of the property to merge with the
source
ApplicationData
combining the
specified source
and property