public abstract class MobileMsgRequest extends Object implements org.opennms.protocols.rt.Request<String,MobileMsgRequest,MobileMsgResponse>
Constructor and Description |
---|
MobileMsgRequest(long timeout,
int retries,
MobileMsgResponseCallback cb,
MobileMsgResponseMatcher responseMatcher)
Constructor for MobileMsgRequest.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Delayed o)
compareTo
|
abstract MobileMsgRequest |
createNextRetry()
createNextRetry
|
MobileMsgResponseCallback |
getCb()
getCb
|
long |
getDelay(TimeUnit unit) |
abstract String |
getId()
getId
|
MobileMsgResponseMatcher |
getResponseMatcher()
getResponseMatcher
|
int |
getRetries()
getRetries
|
long |
getSentTime()
getSentTime
|
long |
getTimeout()
getTimeout
|
boolean |
isProcessed()
isProcessed
|
boolean |
matches(MobileMsgResponse response)
matches
|
void |
processError(Throwable t) |
boolean |
processResponse(MobileMsgResponse response)
processResponse
|
MobileMsgRequest |
processTimeout()
processTimeout
|
void |
setCb(MobileMsgResponseCallback cb)
setCb
|
void |
setResponseMatcher(MobileMsgResponseMatcher responseMatcher)
setResponseMatcher
|
void |
setRetries(int retries)
setRetries
|
void |
setSendTimestamp(long timeInMillis)
setSendTimestamp
|
void |
setTimeout(long timeout)
setTimeout
|
String |
toString() |
public MobileMsgRequest(long timeout, int retries, MobileMsgResponseCallback cb, MobileMsgResponseMatcher responseMatcher)
Constructor for MobileMsgRequest.
timeout
- a long.retries
- a int.cb
- a MobileMsgResponseCallback
object.responseMatcher
- a MobileMsgResponseMatcher
object.public long getSentTime()
getSentTime
public long getTimeout()
getTimeout
public void setTimeout(long timeout)
setTimeout
timeout
- the timeout to setpublic int getRetries()
getRetries
public void setRetries(int retries)
setRetries
retries
- the retries to setpublic MobileMsgResponseCallback getCb()
getCb
public void setCb(MobileMsgResponseCallback cb)
setCb
cb
- the cb to setpublic MobileMsgResponseMatcher getResponseMatcher()
getResponseMatcher
public void setResponseMatcher(MobileMsgResponseMatcher responseMatcher)
setResponseMatcher
responseMatcher
- the responseMatcher to setpublic void setSendTimestamp(long timeInMillis)
setSendTimestamp
timeInMillis
- a long.public long getDelay(TimeUnit unit)
getDelay
in interface Delayed
getDelay
in interface org.opennms.protocols.rt.Request<String,MobileMsgRequest,MobileMsgResponse>
public abstract String getId()
getId
getId
in interface org.opennms.protocols.rt.Request<String,MobileMsgRequest,MobileMsgResponse>
String
object.public void processError(Throwable t)
processError
in interface org.opennms.protocols.rt.Request<String,MobileMsgRequest,MobileMsgResponse>
public boolean processResponse(MobileMsgResponse response)
processResponse
processResponse
in interface org.opennms.protocols.rt.Request<String,MobileMsgRequest,MobileMsgResponse>
response
- a MobileMsgResponse
object.public MobileMsgRequest processTimeout()
processTimeout
processTimeout
in interface org.opennms.protocols.rt.Request<String,MobileMsgRequest,MobileMsgResponse>
MobileMsgRequest
object.public abstract MobileMsgRequest createNextRetry()
createNextRetry
MobileMsgRequest
object.public int compareTo(Delayed o)
compareTo
compareTo
in interface Comparable<Delayed>
o
- a Delayed
object.public boolean matches(MobileMsgResponse response)
matches
response
- a MobileMsgResponse
object.public boolean isProcessed()
isProcessed
isProcessed
in interface org.opennms.protocols.rt.Request<String,MobileMsgRequest,MobileMsgResponse>
Copyright © 2015. All Rights Reserved.