Interface Message
- All Known Implementing Classes:
Message
public interface Message
A message which can be stored in a Platform message queue. See
MessageQueueService
for enqueueing, and MessageHandler
for dequeueing.-
Method Summary
Modifier and Type Method Description java.lang.String
getClientFileName()
For inbound Messages which originated from a file, specifies the original file name coming from the client.java.util.Calendar
getCreationDate()
Date/time when the Message was persisted to the database.java.lang.String
getCreationUser()
Name of the user who created the message (if available).java.util.Calendar
getDequeueCompleted()
Date/time at which dequeue was completed (committed) for the Message.java.util.Calendar
getDequeueInitiated()
Date/time at which dequeue was initiated for the Message.java.lang.String
getId()
Client-provided to implement guaranteed delivery and tracking.java.lang.String
getInboundInterface()
For messages inbound to platform, specifies the name of the inbound interface to be used for processing.java.lang.String
getInboundInterfaceVersion()
For messages inbound to platform, specifies the version of the inbound interface to be used for processing.QueueRef
getInboundQueueRef()
For messages inbound to platform, this will match the OwningQueue.java.lang.String
getMetadata()
Returns aribtrary metadata attached to the Message.java.lang.String
getOutboundInterface()
For messages outbound from platform, specifies the name of the outbound interface used to generate the message.java.lang.String
getOutboundInterfaceVersion()
For messages outbound from platform, specifies the version of the outbound interface used to generate the message.QueueRef
getOutboundQueueRef()
For messages outbound from platform, this will match the OwningQueue.QueueRef
getOwningQueueRef()
Queue in which the Message resides.java.io.File
getPayloadPath()
Deprecated.Use#getPayLoadResource()
to get storage independent message payloadjava.lang.String
getPayloadRef()
Returns the path of the payload relative the root of the Message Storage service.SharedStorageServiceResource
getPayloadResource()
Returns the storage resource for payload.java.lang.String
getProcessingState()
Returns the processing state of the message.java.lang.String
getRelatedMessageId()
Id of a RelatedMessage e.g.java.lang.String
getRelatedMessageSender()
Sender of a RelatedMessage e.g.java.lang.String
getSender()
Client provided or VcId.Stage in case of P2PI e.g.java.lang.Long
getSysId()
Database surrogate key of the messagejava.io.InputStream
readPayload()
Returns the InputStream of payload on message.void
setClientFileName(java.lang.String value)
For inbound Messages which originated from a file, specifies the original file name coming from the client.void
setId(java.lang.String value)
Client-provided to implement guaranteed delivery and tracking.void
setInboundInterface(java.lang.String value)
For messages inbound to platform, specifies the name of the inbound interface to be used for processing.void
setInboundInterfaceVersion(java.lang.String value)
For messages inbound to platform, specifies the version of the inbound interface to be used for processing.void
setInboundQueueRef(QueueRef queueRef)
For messages inbound to platform, this will match the OwningQueue.void
setMetadata(java.lang.String metadata)
Sets aribtrary metadata attached to the Message.void
setOutboundInterface(java.lang.String value)
For messages outbound from platform, specifies the name of the outbound interface used to generate the message.void
setOutboundInterfaceVersion(java.lang.String value)
For messages outbound from platform, specifies the version of the outbound interface used to generate the message.void
setOutboundQueueRef(QueueRef queueRef)
For messages outbound from platform, specifies the name of the outbound interface used to generate the message.void
setOwningQueueRef(QueueRef queueRef)
Queue in which the Message resides.void
setRelatedMessageId(java.lang.String value)
Id of a RelatedMessage e.g.void
setRelatedMessageSender(java.lang.String value)
Sender of a RelatedMessage e.g.void
setSender(java.lang.String value)
Client provided or VcId.Stage in case of P2PI e.g.java.io.OutputStream
writePayload()
Returns an OutputStream to which the client can write the contents of the Message payload.
-
Method Details
-
getClientFileName
java.lang.String getClientFileName()For inbound Messages which originated from a file, specifies the original file name coming from the client. For outbound messages which may be converted to files, provides a recommended name to use. -
getCreationDate
java.util.Calendar getCreationDate()Date/time when the Message was persisted to the database. -
getCreationUser
java.lang.String getCreationUser()Name of the user who created the message (if available). -
getDequeueCompleted
java.util.Calendar getDequeueCompleted()Date/time at which dequeue was completed (committed) for the Message. -
getDequeueInitiated
java.util.Calendar getDequeueInitiated()Date/time at which dequeue was initiated for the Message. Note that if a Message's dequeue is started but not completed, then DequeueInitiated will have a value, but DequeueCompleted will not. -
getId
java.lang.String getId()Client-provided to implement guaranteed delivery and tracking. A Message is uniquely identified by its Id + Sender. -
getInboundInterface
java.lang.String getInboundInterface()For messages inbound to platform, specifies the name of the inbound interface to be used for processing. For messages outbound from platform, this will reference an interface in another Platform instance which will be used to process it, or in a case where the message will just be dumped to file or some other location, it is informational only and can be any value or null. -
getInboundInterfaceVersion
java.lang.String getInboundInterfaceVersion()For messages inbound to platform, specifies the version of the inbound interface to be used for processing. -
getInboundQueueRef
QueueRef getInboundQueueRef()For messages inbound to platform, this will match the OwningQueue. For messages outbound from platform, this will reference a queue in another Platform instance into which this may ultimately be enqueued, or in a case where the message will just be dumped to file or some other location, it is informational only and can be any value or null. -
getOutboundInterface
java.lang.String getOutboundInterface()For messages outbound from platform, specifies the name of the outbound interface used to generate the message. For messages inbound to platform, this will reference an interface in another Platform instance which was be used to generate the message, or in a case where the message was enqueued from a file or some other location, it is informational only and can be any value or null. -
getOutboundInterfaceVersion
java.lang.String getOutboundInterfaceVersion()For messages outbound from platform, specifies the version of the outbound interface used to generate the message. -
getOutboundQueueRef
QueueRef getOutboundQueueRef()For messages outbound from platform, this will match the OwningQueue. For messages inbound to platform, this will reference a queue in another Platform instance from which this message arrived, or in a case where the message was enqueued from a file or some other location, it is informational only and can be any value or null. -
getOwningQueueRef
QueueRef getOwningQueueRef()Queue in which the Message resides. -
writePayload
java.io.OutputStream writePayload() throws java.io.IOExceptionReturns an OutputStream to which the client can write the contents of the Message payload. OwningQueueRef must be set before calling this method.- Throws:
java.io.IOException
-
readPayload
java.io.InputStream readPayload() throws java.io.IOExceptionReturns the InputStream of payload on message.- Throws:
java.io.IOException
-
getPayloadPath
@Deprecated java.io.File getPayloadPath()Deprecated.Use#getPayLoadResource()
to get storage independent message payloadReturns the absolute path of the payload. Not valid to be called beforewritePayload()
has been called. -
getPayloadResource
SharedStorageServiceResource getPayloadResource()Returns the storage resource for payload. Not valid to be called beforewritePayload()
has been called. -
getPayloadRef
java.lang.String getPayloadRef()Returns the path of the payload relative the root of the Message Storage service. Not valid to be called beforewritePayload()
has been called. -
getRelatedMessageId
java.lang.String getRelatedMessageId()Id of a RelatedMessage e.g. error response will have link back to input message. -
getRelatedMessageSender
java.lang.String getRelatedMessageSender()Sender of a RelatedMessage e.g. error response will have link back to input message. -
getSender
java.lang.String getSender()Client provided or VcId.Stage in case of P2PI e.g. 200.UAT. A Message is uniquely identified by its Id + Sender. -
setClientFileName
void setClientFileName(java.lang.String value)For inbound Messages which originated from a file, specifies the original file name coming from the client. For outbound messages which may be converted to files, provides a recommended name to use. -
setId
void setId(java.lang.String value)Client-provided to implement guaranteed delivery and tracking. A Message is uniquely identified by its Id + Sender. -
setInboundInterface
void setInboundInterface(java.lang.String value)For messages inbound to platform, specifies the name of the inbound interface to be used for processing. For messages outbound from platform, this will reference an interface in another Platform instance which will be used to process it, or in a case where the message will just be dumped to file or some other location, it is informational only and can be any value or null. -
setInboundInterfaceVersion
void setInboundInterfaceVersion(java.lang.String value)For messages inbound to platform, specifies the version of the inbound interface to be used for processing. -
setOutboundInterface
void setOutboundInterface(java.lang.String value)For messages outbound from platform, specifies the name of the outbound interface used to generate the message. For messages inbound to platform, this will reference an interface in another Platform instance which was be used to generate the message, or in a case where the message was enqueued from a file or some other location, it is informational only and can be any value or null. -
setOutboundInterfaceVersion
void setOutboundInterfaceVersion(java.lang.String value)For messages outbound from platform, specifies the version of the outbound interface used to generate the message. -
setRelatedMessageId
void setRelatedMessageId(java.lang.String value)Id of a RelatedMessage e.g. error response will have link back to input message. -
setRelatedMessageSender
void setRelatedMessageSender(java.lang.String value)Sender of a RelatedMessage e.g. error response will have link back to input message. -
setSender
void setSender(java.lang.String value)Client provided or VcId.Stage in case of P2PI e.g. 200.UAT. A Message is uniquely identified by its Id + Sender. -
setInboundQueueRef
For messages inbound to platform, this will match the OwningQueue. For messages outbound from platform, this will reference a queue in another Platform instance into which this may ultimately be enqueued, or in a case where the message will just be dumped to file or some other location, it is informational only and can be any value or null. -
setOutboundQueueRef
For messages outbound from platform, specifies the name of the outbound interface used to generate the message. For messages inbound to platform, this will reference an interface in another Platform instance which was be used to generate the message, or in a case where the message was enqueued from a file or some other location, it is informational only and can be any value or null. -
setOwningQueueRef
Queue in which the Message resides. -
getSysId
java.lang.Long getSysId()Database surrogate key of the message -
getProcessingState
java.lang.String getProcessingState()Returns the processing state of the message. Can be Processed or Pending- Returns:
-
getMetadata
java.lang.String getMetadata()Returns aribtrary metadata attached to the Message. May be used during processing in order to vary the interpertation of the file. -
setMetadata
void setMetadata(java.lang.String metadata)Sets aribtrary metadata attached to the Message. May be used during processing in order to vary the interpertation of the file.
-