public class AgentChannel extends Object
Object) and optional attributes identified by string keys.
A channel is identified by a unique path (slash-separated string, with the subsystem
name as the first element). The path is used to establish channel equality and hash code.| Modifier and Type | Field and Description |
|---|---|
protected HashMap<String,Object> |
data |
static AgentChannel |
NONE
Immutable empty channel.
|
protected Object |
value |
static String |
VALUE_KEY
Key that identifies the central value of a channel.
|
| Modifier | Constructor and Description |
|---|---|
|
AgentChannel(AgentChannel other)
Copy constructor.
|
protected |
AgentChannel(String path,
org.lsst.ccs.bus.data.AgentInfo agent)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Object |
get()
Returns the current central value of this channel.
|
Object |
get(String 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. |
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() |
String |
toString() |
public static AgentChannel NONE
public static final String VALUE_KEY
protected Object value
protected AgentChannel(String path, org.lsst.ccs.bus.data.AgentInfo agent)
path - Unique path identifying this channel.agent - Agent this channel belongs to.public AgentChannel(AgentChannel other)
other - Channel to copy.public String getPath()
public String getAgentName()
Agent this channel belongs to.public org.lsst.ccs.bus.data.AgentInfo getAgent()
Agent this channel belongs to.public String getLocalPath()
public Object get(String key)
key.key - Attribute key. If VALUE_KEY, the central value is returned.null if this channel does not have the specified attribute.public Object get()
Copyright © 2017 LSST. All rights reserved.