public class ChannelResponse extends Object
Response object for the "get channel" function of the web-service API.
This object is primarily intended to facilitate the JSON serialization of the data provided by the API controller. For this reason, it does not perform any checks on the parameters used to construct the object.
| Constructor and Description |
|---|
ChannelResponse(UUID channelDataId,
String channelName,
String controlSystemName,
String controlSystemType,
Map<Integer,Integer> decimationLevelToRetentionPeriod,
boolean enabled,
String errorMessage,
Map<String,String> options,
UUID serverId,
String serverName,
String state,
Long totalSamplesDropped,
Long totalSamplesSkippedBack,
Long totalSamplesWritten)
Creates a channel response.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
UUID |
getChannelDataId()
Returns the unique identifier that is associated with the data (samples)
for the channel.
|
String |
getChannelName()
Returns the name of this channel.
|
String |
getControlSystemName()
Returns the name of the control-system support for this channel.
|
String |
getControlSystemType()
Returns the control-system type of this channel.
|
Map<Integer,Integer> |
getDecimationLevelToRetentionPeriod()
Returns a map that contains the retention periods of the decimation
levels for the channel.
|
String |
getErrorMessage()
Returns the error message associated with the channel.
|
Map<String,String> |
getOptions()
Returns a map storing the configuration options for this channel.
|
UUID |
getServerId()
Returns the ID of the server that is responsible for this channel.
|
String |
getServerName()
Returns the name of the server that is responsible for this channel.
|
String |
getState()
Returns the state of the channel.
|
Long |
getTotalSamplesDropped()
Returns the total number of samples dropped for this channel.
|
Long |
getTotalSamplesSkippedBack()
Returns the total number of samples that were discarded because they
skipped back in time.
|
Long |
getTotalSamplesWritten()
Returns the total number of samples written for this channel.
|
int |
hashCode() |
boolean |
isEnabled()
Tells whether archiving is enabled for this channel.
|
String |
toString() |
public ChannelResponse(UUID channelDataId, String channelName, String controlSystemName, String controlSystemType, Map<Integer,Integer> decimationLevelToRetentionPeriod, boolean enabled, String errorMessage, Map<String,String> options, UUID serverId, String serverName, String state, Long totalSamplesDropped, Long totalSamplesSkippedBack, Long totalSamplesWritten)
channelDataId - unique identifier associated with the data (samples) for each
channel. This identifier must be different for each channel.
It is used instead of the channel name when storing data, so
that the channel can be renamed later without losing data.channelName - name of this channel. The name is a textual identifier that
uniquely identifies the channel within the archive.controlSystemName - human-readable name of the control-system used for this
channel.controlSystemType - control-system type of this channel. The control-system type
defines the control-system that provides new data for the
channel.decimationLevelToRetentionPeriod - map that contains the retention periods of the decimation
levels for the channel. The decimation levels are used as keys
and the corresponding retention periods (in seconds) are
stored as values. A retention period that is zero or negative
means that samples for the corresponding decimation level are
supposed to be retained forever.enabled - true if archiving is enabled and the server
should archive new samples received for the channel.
false if archiving is disabled and the server
should not archive new samples for the channel but just use
the samples that have been archived previously.errorMessage - error message associated with this channel. This parameter may
be null. If the state is not
ERROR, it must be null.options - map storing the configuration options for this channel. The
configuration options are passed on to the control-system
specific adapter. The meaning of the options depends on this
control-system specific code. The map should not contain
null keys or values.serverId - ID of the server that is responsible for this channel.serverName - human-readable name of the server that is responsible for this
channel. Typically, this is the hostname of the server.state - state of the channel. One of the strings
destroyed, disabled,
disconnected, error
initializing, or ok.totalSamplesDropped - total number of samples that have been dropped (discarded) for
the channel because they arrived to quickly and could not be
written in time. This counter is reset when a channel is
(re-)initialized (e.g. because its configuration has changed).totalSamplesSkippedBack - total number of samples that have been dropped (discarded)
because their time-stamp was less than or equal to a sample
that was written earlier. This counter is reset when a channel
is (re-)initialized (e.g. because its configuration has
changed).totalSamplesWritten - total number of samples that have been written (persisted) for
this channel. This counter is reset when a channel is
(re-)initialized (e.g. because its configuration has changed).public UUID getChannelDataId()
public String getChannelName()
public String getControlSystemName()
public String getControlSystemType()
public Map<Integer,Integer> getDecimationLevelToRetentionPeriod()
public boolean isEnabled()
true, archiving is enabled and the server should archive new
samples received for the channel. If false, archiving is
disabled and the server should not archive new samples for the channel
but just use the samples that have been archived previously.true if archiving is enabled for this channel,
false otherwise.public String getErrorMessage()
ERROR state, the error message is always
null. Even if it is in the ERROR state, the
error message is optional and might be null.null if
no error message is available.public Map<String,String> getOptions()
null keys or values.public UUID getServerId()
public String getServerName()
public String getState()
destroyed, disabled,
disconnected, error initializing,
or ok. If status information is not available (e.g. because
the responsible server is offline), null is returned.null if status information
is not available.public Long getTotalSamplesDropped()
null is returned.null if status information is not available.public Long getTotalSamplesSkippedBack()
null is
returned.null if status information is not available.public Long getTotalSamplesWritten()
null is returned.null if status information is not available.Copyright © 2011–2017 aquenos GmbH. All rights reserved.