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 boolean
isV4Available()
boolean
isV6Available()
void
onPingReply(InetAddress address, EchoPacket packet)
void
sendRequest(JnaPingRequest request)
Send a message using the messenger servicevoid
setAllowFragmentation(boolean allow)
void
setTrafficClass(int tc)
void
start(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:Messenger
Send a message using the messenger service- Specified by:
sendRequest
in interfaceMessenger<JnaPingRequest,JnaPingReply>
-
start
public void start(ReplyHandler<JnaPingReply> callback)
Description copied from interface:Messenger
Start listening for replies and call the reply handler with any replies received.- Specified by:
start
in interfaceMessenger<JnaPingRequest,JnaPingReply>
-
onPingReply
public void onPingReply(InetAddress address, EchoPacket packet)
- Specified by:
onPingReply
in interfacePingReplyListener
-
setTrafficClass
public void setTrafficClass(int tc) throws IOException
- Throws:
IOException
-
setAllowFragmentation
public void setAllowFragmentation(boolean allow) throws IOException
- Throws:
IOException
-
-