public class Data<T> extends Object implements Serializable
null
.Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_CLASSNAME
Data Types.
|
protected Hashtable<String,Object> |
data
All the data will be stored in this Data dictionary.
|
static String |
DATA_CONTENT
Key to be used to obtain the data content.
|
static String |
DATA_ID
Key used to add or get the identifier unique of this data.
|
static String |
DATA_NAME
This name is not used as a key to obtain data content.
|
static String |
DATA_SOURCE
Key to obtain the data source.
|
static String |
DATA_TIMESTAMP
Date timespamp.
|
static String |
DATA_TYPE
Key to obtain the data type.
|
protected ReadWriteLock |
lock
The lock used to keep data integrity.
|
static String |
RETURN_ADDRESS
Return address.
|
Constructor and Description |
---|
Data(T content)
Constructor
|
Data(T content,
String name)
Constructor
|
Data(T content,
String name,
Dictionary metadata)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Return an exact copy of the given data.
|
Object |
get(Object key)
Deprecated.
|
Dictionary |
getAllData()
Get data content plus all the metadata associated to it.
|
T |
getContent()
Get the content
|
String |
getId() |
String |
getLastDeliveryPort()
Get the data source
|
String |
getLastReceivingPort()
Get the data source
|
String |
getName()
Get the data name
|
Object |
getProperty(String key)
Get a metadata
|
Object |
getTimestamp()
Get data timestamp
|
String |
getType()
Get data type
|
boolean |
hasContent() |
void |
removeProperty(String key)
Remove a metadata
|
void |
setContent(T content)
Set the data content
|
void |
setId(String id)
Set the identificator used to route message.
|
void |
setLastDeliveryPort(String port)
Set the data source
|
void |
setLastReceivingPort(String port)
Set the data source
|
void |
setProperty(String key,
Object value)
Add a metadata
|
void |
setType(String type)
Set the data type
|
String |
toString() |
protected transient ReadWriteLock lock
public static final String DATA_NAME
Type : String
.
public static final String DATA_CONTENT
Type : Object
.
public static final String DATA_TYPE
Type : String
.
public static final String DATA_SOURCE
Type : String
.
public static final String DATA_TIMESTAMP
Type : java.util.Date
.
public static final String DATA_ID
Type : String
.
public static final String CONTENT_CLASSNAME
public static final String RETURN_ADDRESS
public Data(T content, String name, Dictionary metadata)
content
- name
- metadata
- public Data(T content)
content
- public final void setProperty(String key, Object value)
key
- value
- public final void removeProperty(String key)
key
- public final Dictionary getAllData()
public final T getContent()
public final boolean hasContent()
public final void setContent(T content)
content
- public final String getName()
public final String getLastReceivingPort()
public final void setLastReceivingPort(String port)
port
- public final void setLastDeliveryPort(String port)
port
- public final String getLastDeliveryPort()
public final Object getTimestamp()
public final String getType()
public final void setType(String type)
type
- public final void setId(String id)
id
- identificator to set.public final String getId()
public final Object clone()
Copyright © 2012-2013 Adele Team | LIG. All Rights Reserved.