Package org.opennms.core.rpc.echo
Class EchoRequest
- java.lang.Object
-
- org.opennms.core.rpc.echo.EchoRequest
-
- All Implemented Interfaces:
RpcRequest
public class EchoRequest extends Object implements RpcRequest
-
-
Field Summary
-
Fields inherited from interface org.opennms.core.rpc.api.RpcRequest
TAG_CLASS_NAME, TAG_DESCRIPTION, TAG_IP_ADDRESS, TAG_NODE_ID, TAG_NODE_LABEL
-
-
Constructor Summary
Constructors Constructor Description EchoRequest()
EchoRequest(String message)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTracingInfo(String key, String value)
boolean
equals(Object obj)
String
getBody()
Long
getDelay()
Long
getId()
String
getLocation()
Used to route the request to the appropriate location.String
getMessage()
io.opentracing.Span
getSpan()
String
getSystemId()
Used to route the request to a particular system at the given location.Long
getTimeToLiveMs()
When using JMS, the request will fail if no response was received in this many milliseconds.Map<String,String>
getTracingInfo()
RPC clients expose tracing info as tags there by giving more context to each RPC trace.int
hashCode()
void
setBody(String body)
Set body when there is large message typically >500KBvoid
setDelay(Long delay)
void
setId(Long id)
void
setLocation(String location)
void
setMessage(String message)
void
setSystemId(String systemId)
void
setTimeToLiveMs(Long timeToLiveMs)
boolean
shouldThrow()
void
shouldThrow(boolean shouldThrow)
String
toString()
-
-
-
Constructor Detail
-
EchoRequest
public EchoRequest()
-
EchoRequest
public EchoRequest(String message)
-
-
Method Detail
-
setId
public void setId(Long id)
-
getId
public Long getId()
-
setMessage
public void setMessage(String message)
-
getMessage
public String getMessage()
-
getBody
public String getBody()
-
setBody
public void setBody(String body)
Set body when there is large message typically >500KB- Parameters:
body
- set body
-
setLocation
public void setLocation(String location)
-
getLocation
public String getLocation()
Description copied from interface:RpcRequest
Used to route the request to the appropriate location.- Specified by:
getLocation
in interfaceRpcRequest
-
setSystemId
public void setSystemId(String systemId)
-
getSystemId
public String getSystemId()
Description copied from interface:RpcRequest
Used to route the request to a particular system at the given location.- Specified by:
getSystemId
in interfaceRpcRequest
-
setTimeToLiveMs
public void setTimeToLiveMs(Long timeToLiveMs)
-
getTimeToLiveMs
public Long getTimeToLiveMs()
Description copied from interface:RpcRequest
When using JMS, the request will fail if no response was received in this many milliseconds.- Specified by:
getTimeToLiveMs
in interfaceRpcRequest
-
getTracingInfo
public Map<String,String> getTracingInfo()
Description copied from interface:RpcRequest
RPC clients expose tracing info as tags there by giving more context to each RPC trace. Implementations should add tags defined above if they are available.- Specified by:
getTracingInfo
in interfaceRpcRequest
-
getSpan
public io.opentracing.Span getSpan()
- Specified by:
getSpan
in interfaceRpcRequest
-
setDelay
public void setDelay(Long delay)
-
getDelay
public Long getDelay()
-
shouldThrow
public void shouldThrow(boolean shouldThrow)
-
shouldThrow
public boolean shouldThrow()
-
-