public class NICParser extends ShellParser
Constructor and Description |
---|
NICParser()
Constructs a NICParser and reads the list of NICs to query
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getInfo()
Return a String with information about this class
|
EventRecord[] |
monitor()
Invokes query() to do the parsing and handles parsing errors for
each one of the NICs specified in the configuration.
|
EventRecord |
query(java.lang.String device)
Reads and parses the output of ifconfig for a specified NIC and
creates an appropriate EventRecord that holds the desirable
information for it.
|
findAll, findPattern, monitor
public NICParser()
public EventRecord query(java.lang.String device) throws java.net.UnknownHostException
query
in class ShellParser
device
- the NIC device name to queryjava.net.UnknownHostException
public EventRecord[] monitor()
monitor
in interface Monitored
monitor
in class ShellParser
public java.lang.String getInfo()
Copyright © 2009 The Apache Software Foundation