public class MimicNodeStore extends AbstractConnection
Provides a Connection for incoming Messages.
Modifier and Type | Class and Description |
---|---|
private static class |
MimicNodeStore.MimicNodeStoreTimer |
class |
MimicNodeStore.NodeMemo |
Connection.ConnectionListener
Modifier and Type | Field and Description |
---|---|
static String |
ADD_PROP_NODE |
static String |
CLEAR_ALL_NODES |
(package private) Connection |
connection |
private static Logger |
logger |
(package private) HashMap<NodeID,MimicNodeStore.NodeMemo> |
map |
(package private) NodeID |
node |
(package private) PropertyChangeSupport |
pcs |
private static MimicNodeStore.MimicNodeStoreTimer |
timer |
Constructor and Description |
---|
MimicNodeStore(Connection connection,
NodeID node) |
Modifier and Type | Method and Description |
---|---|
MimicNodeStore.NodeMemo |
addNode(NodeID id) |
void |
addPropertyChangeListener(PropertyChangeListener l) |
void |
dispose() |
MimicNodeStore.NodeMemo |
findNode(NodeID id)
If node not present, initiate process to find it.
|
Collection<MimicNodeStore.NodeMemo> |
getNodeMemos() |
ProtocolIdentification |
getProtocolIdentification(NodeID dest) |
SimpleNodeIdent |
getSimpleNodeIdent(NodeID dest) |
void |
put(Message msg,
Connection sender)
Put a message to this connection.
|
void |
refresh()
Resets the node store object by clearing all members, and sending out a new message to the bus to validate all nodes.
|
void |
removePropertyChangeListener(PropertyChangeListener l) |
(package private) void |
scheduleTask(TimerTask t,
int delay) |
registerStartNotification
public static final String ADD_PROP_NODE
public static final String CLEAR_ALL_NODES
private static final Logger logger
Connection connection
NodeID node
private static MimicNodeStore.MimicNodeStoreTimer timer
HashMap<NodeID,MimicNodeStore.NodeMemo> map
PropertyChangeSupport pcs
public MimicNodeStore(Connection connection, NodeID node)
public void dispose()
void scheduleTask(TimerTask t, int delay)
public Collection<MimicNodeStore.NodeMemo> getNodeMemos()
public void put(Message msg, Connection sender)
AbstractConnection
put
in interface Connection
put
in class AbstractConnection
msg
- message to sendsender
- Node that is sending the message, used
for tracking, logging, etc.
(This models a two-ended connection to whatever
communications link is used)public void refresh()
public MimicNodeStore.NodeMemo addNode(NodeID id)
public MimicNodeStore.NodeMemo findNode(NodeID id)
id
- remote node ID to findpublic SimpleNodeIdent getSimpleNodeIdent(NodeID dest)
public ProtocolIdentification getProtocolIdentification(NodeID dest)
public void addPropertyChangeListener(PropertyChangeListener l)
public void removePropertyChangeListener(PropertyChangeListener l)
Copyright © 2024 The OpenLCB Group. All rights reserved.