public class BasicChannel extends Object implements MutableAgentChannel
AgentChannel.Key| Modifier and Type | Field and Description |
|---|---|
protected HashMap<String,Object> |
data |
protected Object |
value |
| Modifier | Constructor and Description |
|---|---|
|
BasicChannel(AgentChannel other)
Copy constructor.
|
|
BasicChannel(BasicChannel other)
Copy constructor.
|
protected |
BasicChannel(String path,
org.lsst.ccs.bus.data.AgentInfo agent)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
<T> T |
get()
Returns the current central value of this channel.
|
<T> T |
get(Object key)
Returns the value of the channel attribute identified by the
key. |
org.lsst.ccs.bus.data.AgentInfo |
getAgent()
Returns the descriptor of the
Agent this channel belongs to. |
String |
getAgentName()
Returns the name of the
Agent this channel belongs to. |
List<String> |
getAttributes()
Returns the list of keys of attributes this channel has.
|
String |
getLocalPath()
Returns the path of this channel with the agent name and the following slash stripped.
|
String |
getPath()
Return the unique path of this channel.
|
int |
hashCode() |
boolean |
set(Object value)
Sets the value of this channel.
|
boolean |
set(Object key,
Object value)
Sets the value of the specified attribute.
|
String |
toString() |
protected BasicChannel(String path, org.lsst.ccs.bus.data.AgentInfo agent)
path - Unique path identifying this channel.agent - Agent this channel belongs to.public BasicChannel(BasicChannel other)
other - Channel to copy.public BasicChannel(AgentChannel other)
other - Channel to copy.public String getPath()
getPath in interface AgentChannelpublic String getAgentName()
Agent this channel belongs to.getAgentName in interface AgentChannelpublic org.lsst.ccs.bus.data.AgentInfo getAgent()
Agent this channel belongs to.getAgent in interface AgentChannelpublic String getLocalPath()
getLocalPath in interface AgentChannelpublic <T> T get(Object key)
key.get in interface AgentChannelT - Type of the attribute value.key - Attribute key. If VALUE_KEY or null, the central value is returned.null if this channel does not have the specified attribute.public <T> T get()
get in interface AgentChannelT - Type of the central value.public List<String> getAttributes()
AgentChannelgetAttributes in interface AgentChannelpublic boolean set(Object key, Object value)
set in interface MutableAgentChannelkey - The attribute is identified by the string returned by toString() method of the key object.
If key is null or evaluates to VALUE_KEY, the central value is set.value - The new value.true if the attribute value has changed as a result of this call.public boolean set(Object value)
set in interface MutableAgentChannelvalue - New value.true if the value has changed as a result of this call.Copyright © 2018 LSST. All rights reserved.