public class ParameterRsp extends Message
ParameterReq
. ParameterReq
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected int |
index |
protected Parameter |
param |
protected java.util.Set<Parameter> |
readonly |
protected GenericValue |
value |
protected java.util.Map<Parameter,GenericValue> |
values |
Constructor and Description |
---|
ParameterRsp(Message msg)
Constructs a response message.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all parameter and values.
|
java.lang.Object |
get(Parameter param)
Gets the queried parameter value.
|
int |
getIndex()
Gets the index.
|
java.util.Map<Parameter,java.lang.Object> |
getParameters()
Gets all requested parameters as map.
|
boolean |
isReadonly(Parameter param)
Checks if a parameter is read-only.
|
java.util.Set<Parameter> |
parameters()
Gets all requested parameters as set.
|
protected Parameter |
resolve(Parameter param)
Convert named parameters to qualified parameters, if they match.
|
void |
set(Parameter param,
java.lang.Object value,
boolean readonly)
Sets the parameter.
|
void |
setIndex(int index)
Sets the index for parameter.
|
java.lang.String |
toString()
Gets a string representation of the message.
|
getInReplyTo, getJsonCache, getMessageID, getPerformative, getRecipient, getSender, getSentAt, setInReplyTo, setJsonCache, setMessageID, setPerformative, setRecipient, setSender, setSentAt
protected int index
protected java.util.Map<Parameter,GenericValue> values
protected Parameter param
protected GenericValue value
protected java.util.Set<Parameter> readonly
public ParameterRsp(Message msg)
msg
- message to which this response corresponds to.public void clear()
public int getIndex()
public void setIndex(int index)
index
- index or -1 if not indexedpublic void set(Parameter param, java.lang.Object value, boolean readonly)
param
- parametervalue
- valuereadonly
- true if read-only, false if read-writepublic java.lang.Object get(Parameter param)
param
- Parameter
public boolean isReadonly(Parameter param)
param
- Parameter
public java.util.Set<Parameter> parameters()
public java.util.Map<Parameter,java.lang.Object> getParameters()
protected Parameter resolve(Parameter param)
param
- parameter to resolve