Package org.opennms.netmgt.icmp.jna
Class JnaIcmpMessenger
- java.lang.Object
-
- org.opennms.netmgt.icmp.jna.JnaIcmpMessenger
-
- All Implemented Interfaces:
Messenger<JnaPingRequest,JnaPingReply>,PingReplyListener
public class JnaIcmpMessenger extends Object implements Messenger<JnaPingRequest,JnaPingReply>, PingReplyListener
- Author:
- brozow
-
-
Constructor Summary
Constructors Constructor Description JnaIcmpMessenger(int pingerId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisV4Available()booleanisV6Available()voidonPingReply(InetAddress address, EchoPacket packet)voidsendRequest(JnaPingRequest request)Send a message using the messenger servicevoidsetAllowFragmentation(boolean allow)voidsetTrafficClass(int tc)voidstart(ReplyHandler<JnaPingReply> callback)Start listening for replies and call the reply handler with any replies received.
-
-
-
Method Detail
-
isV4Available
public boolean isV4Available()
-
isV6Available
public boolean isV6Available()
-
sendRequest
public void sendRequest(JnaPingRequest request)
Description copied from interface:MessengerSend a message using the messenger service- Specified by:
sendRequestin interfaceMessenger<JnaPingRequest,JnaPingReply>
-
start
public void start(ReplyHandler<JnaPingReply> callback)
Description copied from interface:MessengerStart listening for replies and call the reply handler with any replies received.- Specified by:
startin interfaceMessenger<JnaPingRequest,JnaPingReply>
-
onPingReply
public void onPingReply(InetAddress address, EchoPacket packet)
- Specified by:
onPingReplyin interfacePingReplyListener
-
setTrafficClass
public void setTrafficClass(int tc) throws IOException- Throws:
IOException
-
setAllowFragmentation
public void setAllowFragmentation(boolean allow) throws IOException- Throws:
IOException
-
-