public final class PingRequest extends Object implements org.opennms.protocols.rt.Request<PingRequestId,PingRequest,PingReply>
Constructor and Description |
---|
PingRequest(PingRequestId id,
long timeout,
int retries,
PingResponseCallback cb)
Constructor for PingRequest.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Delayed request)
compareTo
|
long |
getDelay(TimeUnit unit) |
long |
getExpiration()
getExpiration
|
PingRequestId |
getId()
getId
|
org.smslib.OutboundMessage |
getRequest()
getRequest
|
org.smslib.InboundMessage |
getResponse()
getResponse
|
int |
getRetries()
getRetries
|
long |
getRoundTripTime()
getRoundTripTime
|
long |
getTimeout()
getTimeout
|
boolean |
isExpired()
isExpired
|
boolean |
isProcessed()
isProcessed
|
void |
processError(Throwable t) |
boolean |
processResponse(PingReply reply)
processResponse
|
PingRequest |
processTimeout()
processTimeout
|
void |
setResponseTimestamp(Long millis)
setResponseTimestamp
|
void |
setSentTimestamp(Long millis)
setSentTimestamp
|
String |
toString()
toString
|
public PingRequest(PingRequestId id, long timeout, int retries, PingResponseCallback cb)
Constructor for PingRequest.
id
- a PingRequestId
object.timeout
- a long.retries
- a int.cb
- a PingResponseCallback
object.public PingRequestId getId()
getId
getId
in interface org.opennms.protocols.rt.Request<PingRequestId,PingRequest,PingReply>
PingRequestId
object.public int getRetries()
getRetries
public long getTimeout()
getTimeout
public org.smslib.OutboundMessage getRequest()
getRequest
OutboundMessage
object.public org.smslib.InboundMessage getResponse()
getResponse
InboundMessage
object.public long getExpiration()
getExpiration
public boolean processResponse(PingReply reply)
processResponse
processResponse
in interface org.opennms.protocols.rt.Request<PingRequestId,PingRequest,PingReply>
reply
- a PingReply
object.public PingRequest processTimeout()
processTimeout
processTimeout
in interface org.opennms.protocols.rt.Request<PingRequestId,PingRequest,PingReply>
PingRequest
object.public boolean isExpired()
isExpired
public String toString()
toString
public long getDelay(TimeUnit unit)
getDelay
in interface Delayed
getDelay
in interface org.opennms.protocols.rt.Request<PingRequestId,PingRequest,PingReply>
public int compareTo(Delayed request)
compareTo
compareTo
in interface Comparable<Delayed>
request
- a Delayed
object.public void processError(Throwable t)
processError
in interface org.opennms.protocols.rt.Request<PingRequestId,PingRequest,PingReply>
public void setSentTimestamp(Long millis)
setSentTimestamp
millis
- a Long
object.public void setResponseTimestamp(Long millis)
setResponseTimestamp
millis
- a Long
object.public long getRoundTripTime()
getRoundTripTime
public boolean isProcessed()
isProcessed
isProcessed
in interface org.opennms.protocols.rt.Request<PingRequestId,PingRequest,PingReply>
Copyright © 2015. All Rights Reserved.