@Entity public class Message extends SuperEntity<Long>
Modifier and Type | Field and Description |
---|---|
static String |
ERR_DESC_SEPARATOR
Separator that separates business error descriptions.
|
Constructor and Description |
---|
Message()
Empty (default) constructor.
|
Message(ExternalSystemExtEnum sourceSystem,
String correlationId)
Creates message with specified source system and correlation ID.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Two entities are equal if their ID is equal.
|
boolean |
existHardParent()
Is there message that has parent message with
hard binding? |
String |
getBusinessError()
Gets business error descriptions.
|
List<String> |
getBusinessErrorList()
Gets list of business error descriptions.
|
String |
getCorrelationId()
Gets correlation ID that serves for pairing asynchronous request and response.
|
String |
getCustomData()
Gets custom data.
|
EntityTypeExtEnum |
getEntityType()
Gets type of the entity that is being changed.
|
String |
getEnvelope()
Gets the whole SOAP envelope (= the full original request: SOAP headers, SOAP body).
|
List<ExternalCall> |
getExternalCalls()
Gets the set of referenced external calls.
|
int |
getFailedCount()
Gets number of failed processing.
|
String |
getFailedDesc()
Gets error description if last try was unsuccessful with error.
|
ErrorExtEnum |
getFailedErrorCode()
Gets error code if last try was unsuccessful with error.
|
String |
getFunnelComponentId()
Gets funnel component identifier.
|
String |
getFunnelValue()
Gets value for funnel filtering - you can have funnel that will ensure that there is only one processing
message with same funnel value.
|
Long |
getId()
Get unique ID of the entity.
|
Instant |
getLastUpdateTimestamp()
Gets timestamp when the entity was changed last time.
|
Long |
getMsgId()
Gets unique message ID.
|
Instant |
getMsgTimestamp()
Gets timestamp from source system.
|
Long |
getNodeId()
Gets identifier of node that process this message.
|
String |
getObjectId()
Gets object ID that will be changed during message processing.
|
String |
getOperationName()
Gets operation name, e.g.
|
BindingTypeEnum |
getParentBindingType()
Gets type of binding between parent and child message.
|
Long |
getParentMsgId()
Gets ID of the parent message (if any).
|
String |
getPayload()
Gets body content (XML by default).
|
String |
getProcessId()
Gets process ID that serves for pairing more requests with one process.
|
int |
getProcessingPriority() |
Instant |
getReceiveTimestamp()
Gets timestamp when message was received.
|
List<Request> |
getRequests()
Gets the set of referenced logged requests.
|
ServiceExtEnum |
getService()
Gets service name, e.g.
|
ExternalSystemExtEnum |
getSourceSystem()
Gets source system.
|
Instant |
getStartInQueueTimestamp()
Gets timestamp when the message was added into queue for processing.
|
Instant |
getStartProcessTimestamp()
Gets timestamp when the message started processing.
|
MsgStateEnum |
getState()
Gets message state.
|
boolean |
isExcludeFailedState()
Returns
true if FAILED state should be excluded from guaranteed order. |
boolean |
isGuaranteedOrder()
Gets flag (true/false) if route should be processed in guaranteed order or not.
|
boolean |
isParentMessage()
Is parent message that has child messages?
|
void |
setBusinessError(String businessError) |
void |
setCorrelationId(String correlationId) |
void |
setCustomData(String customData) |
void |
setEntityType(EntityTypeExtEnum entityType) |
void |
setEnvelope(String envelope) |
void |
setExcludeFailedState(boolean excludeFailedState) |
void |
setFailedCount(int failedCount) |
void |
setFailedDesc(String failedDesc) |
void |
setFailedErrorCode(ErrorExtEnum failedErrorCode) |
void |
setFunnelComponentId(String funnelComponentId) |
void |
setFunnelValue(String funnelValue) |
void |
setGuaranteedOrder(boolean guaranteedOrder) |
void |
setId(Long msgId)
Sets unique identifier of the entity.
|
void |
setLastUpdateTimestamp(Instant lastUpdateTimestamp) |
void |
setMsgId(Long msgId) |
void |
setMsgTimestamp(Instant msgTimestamp) |
void |
setNodeId(Long nodeId)
Sets identifier of node that process this message.
|
void |
setObjectId(String objectId) |
void |
setOperationName(String operationName) |
void |
setParentBindingType(BindingTypeEnum parentBindingType) |
void |
setParentMessage(boolean parentMessage) |
void |
setParentMsgId(Long parentMsgId) |
void |
setPayload(String payload) |
void |
setProcessId(String processId) |
void |
setProcessingPriority(int processingPriority)
Sets priority of processing this message.
|
void |
setReceiveTimestamp(Instant receiveTimestamp) |
void |
setService(ServiceExtEnum service) |
void |
setSourceSystem(ExternalSystemExtEnum sourceSystem) |
void |
setStartInQueueTimestamp(Instant startInQueueTimestamp) |
void |
setStartProcessTimestamp(Instant startProcessTimestamp) |
void |
setState(MsgStateEnum state) |
String |
toHumanString()
Returns human readable entity identification with start and end round brackets.
|
String |
toString() |
hashCode, isNew
public static final String ERR_DESC_SEPARATOR
public Message()
public Message(ExternalSystemExtEnum sourceSystem, String correlationId)
sourceSystem
- the source systemcorrelationId
- the correlation IDpublic Long getMsgId()
public void setMsgId(Long msgId)
public void setId(@Nullable Long msgId)
Identifiable
setId
in interface Identifiable<Long>
setId
in class SuperEntity<Long>
msgId
- unique identifier@Nullable public Long getId()
SuperEntity
getId
in interface Identifiable<Long>
getId
in class SuperEntity<Long>
@Nullable public Instant getMsgTimestamp()
public void setMsgTimestamp(Instant msgTimestamp)
@Nullable public Instant getReceiveTimestamp()
public void setReceiveTimestamp(Instant receiveTimestamp)
public ServiceExtEnum getService()
public void setService(ServiceExtEnum service)
public String getOperationName()
public void setOperationName(String operationName)
@Nullable public String getObjectId()
getEntityTypeInternal()
@Nullable public EntityTypeExtEnum getEntityType()
In general it's enough to detect identical changed data by objectId and operation name but there are few different operations which can change the same data (e.g. setCustomer, setCustomerExt).
If defined then it will be used for "obsolete operation call" detection instead of operation name.
getObjectId()
public void setEntityType(@Nullable EntityTypeExtEnum entityType)
public String getCorrelationId()
public void setCorrelationId(String correlationId)
@Nullable public String getProcessId()
public String getPayload()
public void setPayload(String payload)
@Nullable public String getEnvelope()
null
because it's possible to turn off saving the envelope
with regards to performancepublic ExternalSystemExtEnum getSourceSystem()
public void setSourceSystem(ExternalSystemExtEnum sourceSystem)
public MsgStateEnum getState()
public void setState(MsgStateEnum state)
@Nullable public Instant getStartProcessTimestamp()
public void setStartProcessTimestamp(Instant startProcessTimestamp)
@Nullable public Instant getStartInQueueTimestamp()
public void setStartInQueueTimestamp(Instant startInQueueTimestamp)
public int getFailedCount()
public void setFailedCount(int failedCount)
@Nullable public ErrorExtEnum getFailedErrorCode()
Note: there can be only one error during message processing because next processing is stopped when an error occurred.
public void setFailedErrorCode(@Nullable ErrorExtEnum failedErrorCode)
@Nullable public String getFailedDesc()
@Nullable public Instant getLastUpdateTimestamp()
@Nullable public String getCustomData()
Custom data can be used for saving arbitrary data for transferring state between more processing calls of the asynchronous message.
@Nullable public String getBusinessError()
During processing of asynchronous message can be collected lot of business errors which is suitable to present to source (callee) system (for example when we want to create new customer and this customer doesn't have valid customer number).
Each error description is separated by "||".
public List<String> getBusinessErrorList()
@Nullable public Long getParentMsgId()
getParentBindingType()
@Nullable public BindingTypeEnum getParentBindingType()
getParentMsgId()
public void setParentBindingType(@Nullable BindingTypeEnum parentBindingType)
public boolean existHardParent()
hard
binding?true
for hard-binding parent message otherwise false
public boolean isParentMessage()
Note: binding between child and parent message must be hard
.
true
when this message is parent, otherwise false
public void setParentMessage(boolean parentMessage)
public String getFunnelValue()
getFunnelComponentId()
public void setFunnelValue(String funnelValue)
public String getFunnelComponentId()
getFunnelValue()
public void setFunnelComponentId(String funnelComponentId)
public boolean isGuaranteedOrder()
true
for guaranteed order otherwise false
getFunnelValue()
,
isExcludeFailedState()
public void setGuaranteedOrder(boolean guaranteedOrder)
public boolean isExcludeFailedState()
true
if FAILED state should be excluded from guaranteed order.
FAILED
state is used for guaranteed order by default;
This option has influence only if guaranteed processing order
is enabled.
true
if FAILED state should be excludedisGuaranteedOrder()
public void setExcludeFailedState(boolean excludeFailedState)
public List<ExternalCall> getExternalCalls()
public List<Request> getRequests()
public int getProcessingPriority()
public void setProcessingPriority(int processingPriority)
processingPriority
- the priority number@Nullable public Long getNodeId()
NULL
no node process this messagepublic void setNodeId(@Nullable Long nodeId)
nodeId
- node identifier, NULL
no node process this messagepublic boolean equals(Object obj)
SuperEntity
equals
in class SuperEntity<Long>
public String toString()
toString
in class SuperEntity<Long>
public String toHumanString()
HumanReadable
toHumanString
in interface HumanReadable
toHumanString
in class SuperEntity<Long>
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.