Package com.attivio.sdk.esb
Interface PlatformMessage
-
- All Superinterfaces:
java.lang.Cloneable
,java.io.Serializable
- All Known Subinterfaces:
GroupedMessage
,IndexMessage
,PersistsThroughCycles
- All Known Implementing Classes:
AbstractIndexMessage
,AbstractListMessage
,AbstractPlatformMessage
,AdminMessage
,AuthenticationRequest
,AuthenticationResponse
,Backup
,BulkUpdate
,CgiRequest
,Commit
,DocumentList
,ExceptionResponse
,MessageList
,MultiRegionContentMessage
,Optimize
,Ping
,PingResponse
,ProcessingResultMessage
,PropertiesMessage
,QueryRequest
,QueryResponse
,QueryTrack
,Shutdown
,ShutdownImmediately
,StreamResponse
,StringMessage
public interface PlatformMessage extends java.lang.Cloneable, java.io.Serializable
Interface that underlies all information moving inside and between Attivio systems. Properties for the message are contained in theMessageMetadata
returned bygetMetadata()
.
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_MAX_LOG_LENGTH
the default maximum log line lengthstatic java.lang.String
MESSAGE_DROPPED
a property name used to annotate messages for which the audit api is notified of the dropstatic java.lang.String
MESSAGE_SEND_TIME_PROP
a property name used to annotate messages with their send timestatic java.lang.String
PROP_MAX_LOG_LENGTH
Property name that controls the maximum length of the logging of a PlatformMessage.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addMessageHistory(MessageHistory item)
Adds an item to this message's history.void
addMessageHistory(java.util.List<MessageHistory> historyList)
Adds items to this message's history.PlatformMessage
clone()
Clones a message.java.util.UUID
getClientId()
Gets the client to which this message belongs (may have originated with the client or be a response to the client).long
getEstimatedSize()
java.util.List<MessageHistory>
getMessageHistory()
Gets the list of components that have processed this message.MessageId
getMessageId()
Gets the message id associated with the message.MessageMetadata
getMetadata()
Gets the message metadata from this message.java.lang.Object
getProperty(java.lang.String key)
Gets an arbitrary property for the message.WorkflowQueue
getWorkflowQueue()
Gets the workflow queue.WorkflowQueue
getWorkflowQueue(boolean createIfNull)
Optionally creates a new empty queue if null.boolean
isRedelivered()
Returns true if the message (or its originating message) is re-delivered Redelivery is generally due to a failure and subsequent recovery in a fault tolerant system.void
removeProperty(java.lang.String key)
Removes a property from the message.void
setClientId(java.util.UUID clientId)
Sets the client to which this message belongs.void
setMessageId(MessageId id)
Sets the message id associated with the message.void
setProperty(java.lang.String key, java.lang.Object value)
Sets an arbitrary property for the message.void
setRedelivered(boolean redelivered)
Sets the re-delivered flag.void
setWorkflowQueue(WorkflowQueue wfQueue)
Sets the workflow queue.void
setWorkflowQueue(java.lang.String... wfQueue)
Sets the workflow queue.java.lang.String
toMessageString()
Gets a string-based representation of the message containing string data only.
-
-
-
Field Detail
-
PROP_MAX_LOG_LENGTH
static final java.lang.String PROP_MAX_LOG_LENGTH
Property name that controls the maximum length of the logging of a PlatformMessage.- See Also:
- Constant Field Values
-
DEFAULT_MAX_LOG_LENGTH
static final long DEFAULT_MAX_LOG_LENGTH
the default maximum log line length- See Also:
- Constant Field Values
-
MESSAGE_SEND_TIME_PROP
static final java.lang.String MESSAGE_SEND_TIME_PROP
a property name used to annotate messages with their send time- See Also:
- Constant Field Values
-
MESSAGE_DROPPED
static final java.lang.String MESSAGE_DROPPED
a property name used to annotate messages for which the audit api is notified of the drop- See Also:
- Constant Field Values
-
-
Method Detail
-
setProperty
void setProperty(java.lang.String key, java.lang.Object value)
Sets an arbitrary property for the message. Some transformations of messages may result in the value being converted to a String.- Parameters:
key
- the keyvalue
- the value
-
getProperty
java.lang.Object getProperty(java.lang.String key)
Gets an arbitrary property for the message. Some transformations of messages may result in the value being converted to a String.- Parameters:
key
- the key- Returns:
- property value
-
removeProperty
void removeProperty(java.lang.String key)
Removes a property from the message.- Parameters:
key
-
-
isRedelivered
boolean isRedelivered()
Returns true if the message (or its originating message) is re-delivered Redelivery is generally due to a failure and subsequent recovery in a fault tolerant system.- Returns:
- true if the message is re-delivered
-
setRedelivered
void setRedelivered(boolean redelivered)
Sets the re-delivered flag.- Parameters:
redelivered
-
-
getClientId
java.util.UUID getClientId()
Gets the client to which this message belongs (may have originated with the client or be a response to the client).- Returns:
- the client ID
-
setClientId
void setClientId(java.util.UUID clientId)
Sets the client to which this message belongs.- Parameters:
clientId
- the client ID
-
getMessageId
MessageId getMessageId()
Gets the message id associated with the message. message ids are used for internal ordering guarantees and may change as the message propagates through the system.- Returns:
- the message ID
-
setMessageId
void setMessageId(MessageId id)
Sets the message id associated with the message.- Parameters:
id
- the message ID
-
getMetadata
MessageMetadata getMetadata()
Gets the message metadata from this message.- Returns:
- the message metadata
-
getMessageHistory
java.util.List<MessageHistory> getMessageHistory()
Gets the list of components that have processed this message. The returned list is unmodifiable.- Returns:
- the message history
-
addMessageHistory
void addMessageHistory(MessageHistory item)
Adds an item to this message's history.- Parameters:
item
- the item to add
-
addMessageHistory
void addMessageHistory(java.util.List<MessageHistory> historyList)
Adds items to this message's history.
-
getWorkflowQueue
WorkflowQueue getWorkflowQueue()
Gets the workflow queue. Modifying the returned value will change the workflow destinations for the message.- Returns:
- the workflow queue, may be null.
-
getWorkflowQueue
WorkflowQueue getWorkflowQueue(boolean createIfNull)
Optionally creates a new empty queue if null. Modifying the returned value will change the workflow destinations for the message.- Parameters:
createIfNull
- if true and the queue is not set, creates a new empty queue- Returns:
- the workflow queue
-
setWorkflowQueue
void setWorkflowQueue(WorkflowQueue wfQueue)
Sets the workflow queue.wfQueue
will be cloned.- Parameters:
wfQueue
- the workflow queue
-
setWorkflowQueue
void setWorkflowQueue(java.lang.String... wfQueue)
Sets the workflow queue.wfQueue
will be cloned.- Parameters:
wfQueue
- the list of workflows
-
toMessageString
java.lang.String toMessageString()
Gets a string-based representation of the message containing string data only.- Returns:
- the message string
-
clone
PlatformMessage clone()
Clones a message. The message ID is not cloned.- Returns:
- the cloned index message
-
getEstimatedSize
long getEstimatedSize()
-
-