public class MxSwiftMessage extends AbstractSwiftMessage
MMX messages are uniquely identify by their business process, message functionality, variant and version.
Consider the following example: TREA.001.001.02
businessProcess: Alphabetic code in four positions (fixed length) identifying the Business Process
functionality: Alphanumeric code in three positions (fixed length) identifying the Message Functionality
variant: Numeric code in three positions (fixed length) identifying a particular flavor (variant) of Message Functionality
version: Numeric code in two positions (fixed length) identifying the version.
identifier, PROPERTY_NAME, receiver, sender
Constructor and Description |
---|
MxSwiftMessage() |
MxSwiftMessage(File file)
Creates a new message reading the message the content from a file.
|
MxSwiftMessage(InputStream stream)
Creates a new message reading the message the content from an input stream.
|
MxSwiftMessage(String xml)
Creates a new message reading the message the content from a string.
|
Modifier and Type | Method and Description |
---|---|
void |
copyTo(MxSwiftMessage msg)
copies attributes from this object to the given object
non inherited copied attributes:
functionality
variant
version
|
boolean |
equals(Object obj) |
ApplicationHeader |
getApplicationHeader() |
MxBusinessProcess |
getBusinessProcess() |
String |
getFunctionality() |
String |
getVariant() |
String |
getVersion() |
int |
hashCode() |
static MxSwiftMessage |
parse(File file)
Creates a new message reading the message the content from a file.
|
static MxSwiftMessage |
parse(InputStream stream)
Creates a new message reading the message the content from an input stream.
|
static MxSwiftMessage |
parse(String xml)
Creates a new message reading the message the content from a string.
|
MxSwiftMessage |
readFile(File file)
Deprecated.
use the constructor {@link #MxSwiftMessage(File) instead
|
void |
setApplicationHeader(ApplicationHeader applicationHeader) |
void |
setBusinessProcess(MxBusinessProcess businessProcess) |
protected void |
setDataFromNamespace(String namespace) |
void |
setFunctionality(String functionality) |
void |
setVariant(String variant) |
void |
setVersion(String version) |
protected void |
updateFromMessage()
This method updates the object attributes with metadata parsed from the message,
identifier, sender, receiver, direction and specific data for MT/MX.
If the raw content contains multiple messages, only the first one will be read for metadata an message identification. |
addNote, addStatus, contains, contains, copyTo, findStatusInfo, getChecksum, getCreationDate, getDirection, getFilename, getId, getIdentifier, getLastData, getLastData, getLastModified, getMessage, getMessageName, getNotes, getPaddedId, getPreviousStatusInfo, getProperties, getProperty, getProperty, getPropertyBoolean, getPropertyBoolean, getReceiver, getSender, getStatus, getStatusInfo, getStatusTrail, isIncoming, isInput, isOutgoing, isOutput, isStatus, isStatus, isStatus, isStatus, message, sanityCheckProperties, setChecksum, setCreationDate, setDirection, setFilename, setId, setIdentifier, setLastModified, setMessage, setNotes, setProperties, setProperty, setProperty, setReceiver, setSender, setStatus, setStatus, setStatusTrail
public MxSwiftMessage()
public MxSwiftMessage(String xml)
AbstractSwiftMessage#AbstractSwiftMessage(String)}
public MxSwiftMessage(InputStream stream) throws IOException
IOException
#MxSwiftMessage(String)}
,
AbstractSwiftMessage#AbstractSwiftMessage(InputStream)}
public MxSwiftMessage(File file) throws IOException
IOException
#MxSwiftMessage(String)}
,
AbstractSwiftMessage#AbstractSwiftMessage(File)}
public static MxSwiftMessage parse(String xml)
MxSwiftMessage(String)
public static MxSwiftMessage parse(InputStream stream) throws IOException
MxSwiftMessage(InputStream)
IOException
public static MxSwiftMessage parse(File file) throws IOException
MxSwiftMessage(File)
IOException
protected void updateFromMessage()
AbstractSwiftMessage
updateFromMessage
in class AbstractSwiftMessage
AbstractSwiftMessage.updateFromMessage()
public MxBusinessProcess getBusinessProcess()
public void setBusinessProcess(MxBusinessProcess businessProcess)
public String getFunctionality()
public void setFunctionality(String functionality)
public String getVariant()
public void setVariant(String variant)
public String getVersion()
public void setVersion(String version)
public int hashCode()
hashCode
in class AbstractSwiftMessage
public boolean equals(Object obj)
equals
in class AbstractSwiftMessage
public MxSwiftMessage readFile(File file) throws IOException
readFile
in class AbstractSwiftMessage
IOException
protected void setDataFromNamespace(String namespace)
public ApplicationHeader getApplicationHeader()
public void setApplicationHeader(ApplicationHeader applicationHeader)
public void copyTo(MxSwiftMessage msg)
msg
- AbstractSwiftMessage.copyTo(AbstractSwiftMessage)