public class DefaultNodeFilter extends Object implements NodeFilter
NodeFilter
which allows matching
against any field in the Node
. Any field which is specified
will be considered a part of the match.
Note that some fields permit matching against a 'null' value. A match against 'null' means that the value is unknown. The following matches can be performed against a 'null' value:
name(String)
supplierId(SupplierId)
intf(Interface)
mac(MacAddress)
cp(ConnectionPoint)
deviceId(DeviceId)
IllegalArgumentException
.Constructor and Description |
---|
DefaultNodeFilter()
Constructs a node filter which will match against any node.
|
Modifier and Type | Method and Description |
---|---|
DefaultNodeFilter |
cp(ConnectionPoint cp)
Modifies the current filter to match nodes with the given
connection point.
|
DefaultNodeFilter |
deviceId(DeviceId deviceId)
Modifies the current filter to match nodes with the given device ID.
|
DefaultNodeFilter |
id(NodeId id)
Modifies the current filter to match the node with the given ID.
|
DefaultNodeFilter |
intf(Interface intf)
Modifies the current filter to match nodes with the given interface.
|
DefaultNodeFilter |
ip(IpAddress ip)
Modifies the current filter to match nodes with the given IP address.
|
DefaultNodeFilter |
ip(IpRange range)
Modifies the current filter to match nodes within the given IP range.
|
DefaultNodeFilter |
mac(MacAddress mac)
Modifies the current filter to match nodes with the given MAC.
|
DefaultNodeFilter |
mac(MacRange range)
Modifies the current filter to match nodes within the given MAC range.
|
boolean |
matches(Node node)
Returns whether the given node matches this filter or not.
|
DefaultNodeFilter |
name(String name)
Modifies the current filter to match nodes with the given name.
|
DefaultNodeFilter |
segmentId(SegmentId segmentId)
Modifies the current filter to match nodes with the given segment ID.
|
DefaultNodeFilter |
supplierId(SupplierId supplierId)
Modifies the current filter to match nodes with the given supplier ID.
|
DefaultNodeFilter |
timeout(long timeout)
Modifies the current filter to match nodes with the given timeout.
|
String |
toString() |
public DefaultNodeFilter()
public boolean matches(Node node)
NodeFilter
matches
in interface NodeFilter
node
- the given nodepublic DefaultNodeFilter id(NodeId id)
id
- node IDIllegalArgumentException
- if an invalid ID is specifiedpublic DefaultNodeFilter name(String name)
name
- node namepublic DefaultNodeFilter supplierId(SupplierId supplierId)
supplierId
- node supplier IDpublic DefaultNodeFilter ip(IpAddress ip)
ip
- node IP addressIllegalArgumentException
- if an invalid IP is specifiedpublic DefaultNodeFilter ip(IpRange range)
range
- node IP rangeIllegalArgumentException
- if an invalid range is specifiedpublic DefaultNodeFilter segmentId(SegmentId segmentId)
segmentId
- node segment IDIllegalArgumentException
- if an invalid segment ID is specifiedpublic DefaultNodeFilter intf(Interface intf)
intf
- node interfacepublic DefaultNodeFilter mac(MacAddress mac)
mac
- node MAC addresspublic DefaultNodeFilter mac(MacRange range)
range
- node MAC address rangeIllegalArgumentException
- if an invalid range is specifiedpublic DefaultNodeFilter cp(ConnectionPoint cp)
deviceId(DeviceId)
.cp
- node connection pointpublic DefaultNodeFilter deviceId(DeviceId deviceId)
cp(ConnectionPoint)
.deviceId
- node device IDpublic DefaultNodeFilter timeout(long timeout)
timeout
- node timeoutCopyright © 2015. All Rights Reserved.