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 java.lang.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(java.lang.String message)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTracingInfo(java.lang.String key, java.lang.String value)
boolean
equals(java.lang.Object obj)
java.lang.String
getBody()
java.lang.Long
getDelay()
java.lang.Long
getId()
java.lang.String
getLocation()
Used to route the request to the appropriate location.java.lang.String
getMessage()
io.opentracing.Span
getSpan()
java.lang.String
getSystemId()
Used to route the request to a particular system at the given location.java.lang.Long
getTimeToLiveMs()
When using JMS, the request will fail if no response was received in this many milliseconds.java.util.Map<java.lang.String,java.lang.String>
getTracingInfo()
RPC clients expose tracing info as tags there by giving more context to each RPC trace.int
hashCode()
void
setBody(java.lang.String body)
Set body when there is large message typically >500KBvoid
setDelay(java.lang.Long delay)
void
setId(java.lang.Long id)
void
setLocation(java.lang.String location)
void
setMessage(java.lang.String message)
void
setSystemId(java.lang.String systemId)
void
setTimeToLiveMs(java.lang.Long timeToLiveMs)
boolean
shouldThrow()
void
shouldThrow(boolean shouldThrow)
java.lang.String
toString()
-
-
-
Method Detail
-
setId
public void setId(java.lang.Long id)
-
getId
public java.lang.Long getId()
-
setMessage
public void setMessage(java.lang.String message)
-
getMessage
public java.lang.String getMessage()
-
getBody
public java.lang.String getBody()
-
setBody
public void setBody(java.lang.String body)
Set body when there is large message typically >500KB- Parameters:
body
- set body
-
setLocation
public void setLocation(java.lang.String location)
-
getLocation
public java.lang.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(java.lang.String systemId)
-
getSystemId
public java.lang.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(java.lang.Long timeToLiveMs)
-
getTimeToLiveMs
public java.lang.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 java.util.Map<java.lang.String,java.lang.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
-
addTracingInfo
public void addTracingInfo(java.lang.String key, java.lang.String value)
-
setDelay
public void setDelay(java.lang.Long delay)
-
getDelay
public java.lang.Long getDelay()
-
shouldThrow
public void shouldThrow(boolean shouldThrow)
-
shouldThrow
public boolean shouldThrow()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-