Class MessageSendResult<T>
- java.lang.Object
-
- org.apache.pulsar.reactive.client.api.MessageSendResult<T>
-
- Type Parameters:
T
- the type of the message
public class MessageSendResult<T> extends java.lang.Object
Result of a message sending. Holds the spec of the message sent and the assigned message ID.
-
-
Constructor Summary
Constructors Constructor Description MessageSendResult(org.apache.pulsar.client.api.MessageId messageId, MessageSpec<T> messageSpec, java.lang.Throwable exception)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
<C> C
getCorrelationMetadata()
Gets the correlation metadata of the message spec that was sent.java.lang.Throwable
getException()
Gets the exception if any.org.apache.pulsar.client.api.MessageId
getMessageId()
Gets the ID assigned to the message.MessageSpec<T>
getMessageSpec()
Gets the message spec that was sent.int
hashCode()
-
-
-
Constructor Detail
-
MessageSendResult
public MessageSendResult(org.apache.pulsar.client.api.MessageId messageId, MessageSpec<T> messageSpec, java.lang.Throwable exception)
Creates a new instance.- Parameters:
messageId
- the ID assigned to the messagemessageSpec
- the message spec that was sentexception
- the exception if any
-
-
Method Detail
-
getMessageId
public org.apache.pulsar.client.api.MessageId getMessageId()
Gets the ID assigned to the message.- Returns:
- the ID assigned to the message.
-
getMessageSpec
public MessageSpec<T> getMessageSpec()
Gets the message spec that was sent.- Returns:
- the message spec that was sent
-
getException
public java.lang.Throwable getException()
Gets the exception if any.- Returns:
- the exception if any
-
getCorrelationMetadata
public <C> C getCorrelationMetadata()
Gets the correlation metadata of the message spec that was sent.- Type Parameters:
C
- the correlation metadata- Returns:
- the correlation metadata
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-