public class TraceRecord extends Object
| Modifier and Type | Field and Description |
|---|---|
private String |
action |
static String |
ACTION_PARAMETER_CHANGE
A parameter was changed.
|
static String |
ACTION_RECEIVING
A data item was received.
|
static String |
ACTION_SENDING
A data item was processed and send further.
|
static String |
ACTION_SWITCHED_SERVICE
A family completed switching a service.
|
static String |
ACTION_SWITCHING_SERVICE
A family starts switching a service.
|
private Object |
payload |
private String |
source |
private long |
timestamp |
static String |
TRACE_STREAM |
| Constructor and Description |
|---|
TraceRecord()
Creates a trace record.
|
TraceRecord(String source,
long timestamp,
String action,
Object payload)
Creates a trace record.
|
TraceRecord(String source,
String action,
Object payload)
Creates a trace record with the current time as timestamp.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAction()
Characterizes the action causing the creation of the record.
|
Object |
getPayload()
Returns the (arbitrary) payload.
|
String |
getSource()
Returns the source of the record.
|
long |
getTimestamp()
Returns the timestamp of record creation.
|
void |
send(TransportConnector conn)
Sends this message to the given connector on
#TRACE_STREAM. |
(package private) void |
setAction(String action)
Changes the action causing the creation of the record.
|
(package private) void |
setPayload(Object payload)
Changes the (arbitrary) payload.
|
(package private) void |
setSource(String source)
Defines the source of the record.
|
(package private) void |
setTimestamp(long timestamp)
Changes the timestamp of record creation.
|
public static final String TRACE_STREAM
public static final String ACTION_RECEIVING
public static final String ACTION_SENDING
public static final String ACTION_PARAMETER_CHANGE
public static final String ACTION_SWITCHING_SERVICE
public static final String ACTION_SWITCHED_SERVICE
private String source
private long timestamp
private String action
private Object payload
TraceRecord()
public TraceRecord(String source, String action, Object payload)
source - the source of the recordaction - the actionpayload - arbitrary payloadpublic String getSource()
void setSource(String source)
source - the source, may be a service id, an AAS URL, ...public long getTimestamp()
void setTimestamp(long timestamp)
timestamp - the timestamppublic String getAction()
void setAction(String action)
action - the action, e.g., classification; may be emptypublic Object getPayload()
void setPayload(Object payload)
payload - the payload, may be nullpublic void send(TransportConnector conn) throws IOException
#TRACE_STREAM. [convenience]conn - the connectorIOException - if sending failsCopyright © 2022. All rights reserved.