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,Optimize,Ping,PingResponse,ProcessingResultMessage,PropertiesMessage,QueryRequest,QueryResponse,Shutdown,ShutdownImmediately,StreamResponse,StringMessage
public interface PlatformMessage extends java.lang.Cloneable, java.io.SerializableInterface that underlies all information moving inside and between Attivio systems. Properties for the message are contained in theMessageMetadatareturned bygetMetadata().
-
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_MAX_LOG_LENGTHthe default maximum log line lengthstatic java.lang.StringMESSAGE_DROPPEDa property name used to annotate messages for which the audit api is notified of the dropstatic java.lang.StringMESSAGE_SEND_TIME_PROPa property name used to annotate messages with their send timestatic java.lang.StringPROP_MAX_LOG_LENGTHProperty 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 voidaddMessageHistory(MessageHistory item)Adds an item to this message's history.voidaddMessageHistory(java.util.List<MessageHistory> historyList)Adds items to this message's history.PlatformMessageclone()Clones a message.java.util.UUIDgetClientId()Gets the client to which this message belongs (may have originated with the client or be a response to the client).longgetEstimatedSize()java.util.List<MessageHistory>getMessageHistory()Gets the list of components that have processed this message.MessageIdgetMessageId()Gets the message id associated with the message.MessageMetadatagetMetadata()Gets the message metadata from this message.java.lang.ObjectgetProperty(java.lang.String key)Gets an arbitrary property for the message.WorkflowQueuegetWorkflowQueue()Gets the workflow queue.WorkflowQueuegetWorkflowQueue(boolean createIfNull)Optionally creates a new empty queue if null.booleanisRedelivered()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.voidremoveProperty(java.lang.String key)Removes a property from the message.voidsetClientId(java.util.UUID clientId)Sets the client to which this message belongs.voidsetMessageId(MessageId id)Sets the message id associated with the message.voidsetProperty(java.lang.String key, java.lang.Object value)Sets an arbitrary property for the message.voidsetRedelivered(boolean redelivered)Sets the re-delivered flag.voidsetWorkflowQueue(WorkflowQueue wfQueue)Sets the workflow queue.voidsetWorkflowQueue(java.lang.String... wfQueue)Sets the workflow queue.java.lang.StringtoMessageString()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.wfQueuewill be cloned.- Parameters:
wfQueue- the workflow queue
-
setWorkflowQueue
void setWorkflowQueue(java.lang.String... wfQueue)
Sets the workflow queue.wfQueuewill 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()
-
-