public class NodeServiceAdapter extends Object implements NodeService
NodeService
.Constructor and Description |
---|
NodeServiceAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(NodeListener listener)
Registers a listener for all node-related events.
|
Set<NodeListener> |
getListeners()
Returns the set of listeners for node-related events.
|
Node |
getNode(IpAddress ip,
SegmentId netId)
|
Node |
getNode(NodeId id)
Returns a specific node from the domain, based upon the globally-unique
node ID.
|
Iterator<Node> |
getNodes()
Returns an iterator over all nodes in the domain.
|
Set<Node> |
getNodes(ConnectionPoint cp)
Returns all nodes in the domain where the nodes' most recent location
matches the given connection point.
|
Set<Node> |
getNodes(DeviceId device)
Returns all nodes in the domain where the nodes' most recent location
matches a connection point on the given device ID.
|
Set<Node> |
getNodes(IpAddress ip)
Returns all nodes in the domain with a given IP address.
|
Set<Node> |
getNodes(MacAddress mac,
SegmentId segId)
Returns all nodes in the domain with a given MAC address.
|
Iterator<Node> |
getNodes(NodeFilter filter)
Returns an iterator over all nodes which match the given filter in the
domain.
|
Iterator<Node> |
getNodes(SegmentId netId)
Returns an iterator all nodes in a given segment within the domain.
|
void |
removeListener(NodeListener listener)
Unregisters a listener from node-related events, regardless of which
node-related events the listener was registered to receive.
|
public Iterator<Node> getNodes()
NodeService
getNodes
in interface NodeService
public Iterator<Node> getNodes(SegmentId netId)
NodeService
getNodes
in interface NodeService
netId
- the given segment IDpublic Set<Node> getNodes(IpAddress ip)
NodeService
SegmentId
.
If no matches exist, an empty set will be returned.
getNodes
in interface NodeService
ip
- the given IP addresspublic Set<Node> getNodes(MacAddress mac, SegmentId segId)
NodeService
IpAddress
within the given SegmentId
.
If no matches exist, an empty set will be returned.
getNodes
in interface NodeService
mac
- the given MAC addresssegId
- the given segment IDpublic Set<Node> getNodes(ConnectionPoint cp)
NodeService
If no matches exist, an empty set will be returned.
getNodes
in interface NodeService
cp
- the given connection pointpublic Set<Node> getNodes(DeviceId device)
NodeService
If no matches exist, an empty set will be returned.
getNodes
in interface NodeService
device
- the given device IDpublic Iterator<Node> getNodes(NodeFilter filter)
NodeService
getNodes
in interface NodeService
filter
- the given filterpublic Node getNode(IpAddress ip, SegmentId netId)
NodeService
IpAddress
and
SegmentId
.getNode
in interface NodeService
ip
- IP addressnetId
- segment IDpublic Node getNode(NodeId id)
NodeService
getNode
in interface NodeService
id
- Node IDpublic void addListener(NodeListener listener)
NodeService
addListener
in interface NodeService
listener
- the event listenerpublic void removeListener(NodeListener listener)
NodeService
removeListener
in interface NodeService
listener
- the event listenerpublic Set<NodeListener> getListeners()
NodeService
getListeners
in interface NodeService
Copyright © 2015. All Rights Reserved.