@Override public void ping(InetAddress host, long timeout, int retries, int packetsize, int sequenceId, PingResponseCallback cb) throws Exception { LOG.trace("ping: host={}, timeout={}, retries={}, packetsize={}, sequenceId={}, callback={}", host, timeout, retries, packetsize, sequenceId, cb); cb.handleError(host, null, UNSUPPORTED); }
@Override public void ping(InetAddress host, long timeout, int retries, int sequenceId, PingResponseCallback cb) throws Exception { LOG.trace("ping: host={}, timeout={}, retries={}, sequenceId={}, callback={}", host, timeout, retries, sequenceId, cb); cb.handleError(host, null, UNSUPPORTED); }
/** {@inheritDoc} */ @Override public void processError(final Throwable t) { try { m_callback.handleError(getAddress(), this, t); } finally { setProcessed(true); } }
@Override public void processError(Throwable t) { try { m_callback.handleError(m_id.getAddress(), this, t); } finally { setProcessed(true); } }
@Override public void processError(final Throwable t) { try { m_callback.handleError(m_id.getAddress(), this, t); } finally { setProcessed(true); } }
@Override public void processError(final Throwable t) { try { m_callback.handleError(m_id.getAddress(), this, t); } finally { setProcessed(true); } }
public void send(final V4Pinger v4, final Inet4Address addr4) { try { //throw new IllegalStateException("The m_request field should be set here!!!"); LOG.debug("{}: Sending Ping Request: {}", System.currentTimeMillis(), this); m_expiration = System.currentTimeMillis() + m_timeout; v4.ping(addr4, m_id.getIdentifier(), m_id.getSequenceNumber(), m_id.getThreadId(), 1, 0, m_packetsize); } catch (final Throwable t) { m_callback.handleError(getAddress(), this, t); } }
public void send(final V6Pinger v6, final Inet6Address addr6) { try { //throw new IllegalStateException("The m_request field should be set here!!!"); LOG.debug("{}: Sending Ping Request: {}", System.currentTimeMillis(), this); m_expiration = System.currentTimeMillis() + m_timeout; v6.ping(addr6, m_id.getIdentifier(), m_id.getSequenceNumber(), m_id.getThreadId(), 1, 0, m_packetsize); } catch (final Throwable t) { m_callback.handleError(getAddress(), this, t); } }
/** * Send this JniPingRequest through the given icmpSocket * * @param icmpSocket a {@link org.opennms.protocols.icmp.IcmpSocket} object. */ public void send(IcmpSocket icmpSocket) { try { m_requestPacket = createRequestPacket(); LOG.debug("{}: Sending Ping Request: {}", System.currentTimeMillis(), this); byte[] data = m_requestPacket.toBytes(); m_expiration = System.currentTimeMillis() + m_timeout; send(icmpSocket, new DatagramPacket(data, data.length, m_id.getAddress(), 0)); } catch (Throwable t) { m_callback.handleError(m_id.getAddress(), this, t); } }
/** * Send this JniPingRequest through the given icmpSocket * * @param socket a {@link org.opennms.protocols.icmp.IcmpSocket} object. */ public void send(final ICMPv6Socket socket) { try { m_requestPacket = createRequestPacket(); LOG.debug("{}: Sending Ping Request: {}", System.currentTimeMillis(), this); final byte[] data = m_requestPacket.toBytes(); m_expiration = System.currentTimeMillis() + m_timeout; send(socket, new DatagramPacket(data, data.length, m_id.getAddress(), 0)); } catch (final Throwable t) { m_callback.handleError(m_id.getAddress(), this, t); } }
/** * Send this JniPingRequest through the given icmpSocket * * @param socket a {@link org.opennms.protocols.icmp.IcmpSocket} object. */ public void send(final ICMPv6Socket socket) { try { m_requestPacket = createRequestPacket(); LOG.debug("{}: Sending Ping Request: {}", System.currentTimeMillis(), this); final byte[] data = m_requestPacket.toBytes(); m_expiration = System.currentTimeMillis() + m_timeout; send(socket, new DatagramPacket(data, data.length, m_id.getAddress(), 0)); } catch (final Throwable t) { m_callback.handleError(m_id.getAddress(), this, t); } }
@Override public void handleError(InetAddress address, EchoPacket request, Throwable t) { Map<String, String> mdc = getCopyOfContextMap(); try { setContextMap(m_mdc); m_cb.handleError(address, request, t); } finally { setContextMap(mdc); } }
/** * Send this PingRequest through the given icmpSocket * * @param icmpSocket a {@link org.opennms.protocols.icmp.IcmpSocket} object. */ public void send(IcmpSocket icmpSocket, InetAddress addr) { try { m_request = createRequestPacket(); m_log.debug(System.currentTimeMillis()+": Sending Ping Request: "+this); byte[] data = m_request.toBytes(); icmpSocket.send(new DatagramPacket(data, data.length, m_id.getAddress(), 0)); } catch (Throwable t) { m_callback.handleError(m_id.getAddress(), m_request, t); } }