public class SimpleMetaData extends Object implements MetaDataResolver, Externalizable
Invocation instance.| Modifier and Type | Class and Description |
|---|---|
class |
SimpleMetaData.MetaDataValue
Contains the value of a metadata attribute.
|
| Modifier and Type | Field and Description |
|---|---|
protected HashMap<Object,HashMap<Object,SimpleMetaData.MetaDataValue>> |
metaData
Contains all the metadata entries.
|
EMPTY_TAG| Constructor and Description |
|---|
SimpleMetaData() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMetaData(Object tag,
Object attr,
Object value)
Adds a metadata attribute/value pair to this instance.
|
void |
addMetaData(Object tag,
Object attr,
Object value,
PayloadKey type)
Adds a metadata attribute/value pair to this instance.
|
void |
clear()
Erases all the metadata contained in this instance.
|
SimpleMetaData |
getAllMetaData(Invocation invocation)
Gets all metadata that belongs with the context of
invocation |
Object |
getMetaData(Object tag,
Object attr)
Returns the value of a metadata attribute.
|
boolean |
hasTag(String name)
Indicates whether this instance contains metadata tagged with
name. |
void |
mergeIn(SimpleMetaData data)
Merges incoming data.
|
void |
readExternal(ObjectInput in) |
void |
removeGroupData(Object group)
Removes all attributes identified by the tag
group. |
void |
removeMetaData(Object tag,
Object attr)
Removes the metadata attribute from this instance.
|
Object |
resolve(Invocation invocation,
Object tag,
Object attr) |
int |
size()
Returns the number of items contained in this simple metadata instance.
|
void |
tag(Object tag)
Tags metadata to structure.
|
HashMap<Object,SimpleMetaData.MetaDataValue> |
tag(String name)
Returns the metadata tagged with
name. |
HashSet<Object> |
tags()
Returns the tags that identify the metadata elements contained in this
instance.
|
String |
toString() |
void |
writeExternal(ObjectOutput out) |
protected HashMap<Object,HashMap<Object,SimpleMetaData.MetaDataValue>> metaData
public int size()
public HashSet<Object> tags()
public HashMap<Object,SimpleMetaData.MetaDataValue> tag(String name)
name.name - tag of the queried metadatanamepublic boolean hasTag(String name)
name.name - tag of the queried metadatatrue only if there is metadata tagged with name in this
simple metadata instancepublic void tag(Object tag)
tag - the tag that represents the no-atribute metadata to be addedpublic void addMetaData(Object tag, Object attr, Object value)
tag - identifies the metadata attribute to be addedattr - the name of an attributevalue - the value of attr attributepublic void addMetaData(Object tag, Object attr, Object value, PayloadKey type)
tag - identifies the metadata attribute to be addedattr - the name of an attributevalue - the value of attr attributetype - the payload typepublic Object getMetaData(Object tag, Object attr)
tag - identifies the metadata attribute to be retrievedattr - the name of an attributeattr attributepublic void removeMetaData(Object tag, Object attr)
tag - identifies the metadata attribute to be removedattr - name of the attribute to be removedpublic void removeGroupData(Object group)
group.group - identifies the attributes to be removedpublic void clear()
public void mergeIn(SimpleMetaData data)
data - incoming that that should be merged to this instance.public Object resolve(Invocation invocation, Object tag, Object attr)
resolve in interface MetaDataResolverpublic SimpleMetaData getAllMetaData(Invocation invocation)
MetaDataResolverinvocationgetAllMetaData in interface MetaDataResolverinvocationpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.