Class DefaultUdpPortMonitor
java.lang.Object
com.aoindustries.noc.monitor.portmon.PortMonitor
com.aoindustries.noc.monitor.portmon.DefaultUdpPortMonitor
Monitors any UDP port.
- Author:
- AO Industries, Inc.
-
Field Summary
Fields inherited from class com.aoindustries.noc.monitor.portmon.PortMonitor
canceled, CRLF, ipAddress, port
-
Constructor Summary
ConstructorDescriptionDefaultUdpPortMonitor
(InetAddress ipAddress, Port port) Creates a new default UDP monitor. -
Method Summary
Methods inherited from class com.aoindustries.noc.monitor.portmon.PortMonitor
getPortMonitor, readLine
-
Constructor Details
-
DefaultUdpPortMonitor
Creates a new default UDP monitor.
-
-
Method Details
-
cancel
public void cancel()Description copied from class:PortMonitor
Cancels this port method on a best effort basis. This will not necessarily cause the checkPort method to return immediately. This should only be used once the result of checkPort is no longer relevant, such as after a timeout. Some monitors may still perform their task arbitrarily long after cancel has been called.
It is critical that subclass implementations of this method not block in any way.
- Overrides:
cancel
in classPortMonitor
- See Also:
-
checkPort
Description copied from class:PortMonitor
Checks the port. This may take arbitrarily long to complete, and any timeout should be provided externally and call thecancel
method. If any error occurs, must throw an exception.- Specified by:
checkPort
in classPortMonitor
- Returns:
- the message indicating success
- Throws:
Exception
- See Also:
-