public class AckSystemMessage extends AbstractMT
m
Constructor and Description |
---|
AckSystemMessage(java.io.File file)
Creates a new AckSystemMessage by parsing a file with the message content in its swift FIN format.
If the file content is null or cannot be parsed as a message, the internal message object will be initialized (blocks will be created) but empty. If the file contains multiple messages, only the first one will be parsed. |
AckSystemMessage(java.io.InputStream stream)
Creates a new AckSystemMessage by parsing a input stream with the message content in its swift FIN format, using "UTF-8" as encoding.
If the message content is null or cannot be parsed, the internal message object will be initialized (blocks will be created) but empty. If the stream contains multiple messages, only the first one will be parsed. |
AckSystemMessage(java.lang.String fin)
Creates a new AckSystemMessage by parsing a String with the message content in its swift FIN format.
If the fin parameter is null or the message cannot be parsed, the internal message object will be initialized (blocks will be created) but empty. If the string contains multiple messages, only the first one will be parsed. |
AckSystemMessage(SwiftMessage aMessage) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getErrorCode()
Returns the error code present in NAK messages in field 405
|
java.lang.String |
getErrorLine()
Returns the error line present in NAK messages in field 405
|
java.lang.String |
getMessageType()
Will always return null because service messages do not contain a message type.
|
boolean |
isAck()
Returns true if this message is an ACK (positive acknowledge).
|
boolean |
isNack()
Returns true if this message is an NACK (negative acknowledge).
|
static AbstractMT |
newInstance(SwiftMessage swiftMessage) |
static AckSystemMessage |
parse(java.io.File file)
Creates a new AckSystemMessage by parsing a file with the message content in its swift FIN format.
If the file contains multiple messages, only the first one will be parsed. |
static AckSystemMessage |
parse(java.io.InputStream stream)
Creates a new AckSystemMessage by parsing a input stream with the message content in its swift FIN format, using "UTF-8" as encoding.
If the stream contains multiple messages, only the first one will be parsed. |
static AckSystemMessage |
parse(MtSwiftMessage m)
Creates an AckSystemMessage initialized with the parameter MtSwiftMessage.
|
static AckSystemMessage |
parse(java.lang.String fin)
Creates a new AckSystemMessage by parsing a String with the message content in its swift FIN format.
If the file contains multiple messages, only the first one will be parsed. |
addField, append, append, append, containsSequence, containsSequenceList, create, create, fromJson, getApplicationId, getFields, getLogicalTerminal, getMessagePriority, getMtId, getReceiver, getSender, getSequence, getSequence, getSequence, getSequenceList, getSequenceList, getSequenceNumber, getServiceId, getSessionNumber, getSwiftMessage, getSwiftMessageNotNullOrException, getVariant, isIncoming, isInput, isOutgoing, isOutput, isType, json, message, nameFromClass, read, setReceiver, setReceiver, setSender, setSender, setSwiftMessage, tag, tags, toJson, toString, write, write, xml
getMessageStandardType, isMT, isMX
public AckSystemMessage(SwiftMessage aMessage)
aMessage
- java.lang.RuntimeException
- if the message is not a service message with service id 21 (meaning positive or negative acknowledge)public AckSystemMessage(java.io.InputStream stream) throws java.io.IOException
stream
- an input stream in UTF-8 encoding with the MT message in its FIN swift format.java.io.IOException
public AckSystemMessage(java.io.File file) throws java.io.IOException
file
- a file with the MT message in its FIN swift format.java.io.IOException
public AckSystemMessage(java.lang.String fin)
fin
- a string with the MT message in its FIN swift formatjava.lang.RuntimeException
- if the message is not a service message with service id 21 (meaning positive or negative acknowledge)public static AbstractMT newInstance(SwiftMessage swiftMessage)
swiftMessage
- java.lang.RuntimeException
- if the message is not a service message with service id 21 (meaning positive or negative acknowledge)public static AckSystemMessage parse(MtSwiftMessage m)
m
- swift message with the AckSystemMessage contentAckSystemMessage(String)
public static AckSystemMessage parse(java.io.InputStream stream) throws java.io.IOException
stream
- an input stream in UTF-8 encoding with the MT message in its FIN swift format.java.io.IOException
public static AckSystemMessage parse(java.io.File file) throws java.io.IOException
file
- a file with the MT message in its FIN swift format.java.io.IOException
public static AckSystemMessage parse(java.lang.String fin)
fin
- a string with the MT message in its FIN swift formatjava.lang.RuntimeException
- if the message is not a service message with service id 21 (meaning positive or negative acknowledge)public java.lang.String getMessageType()
getMessageType
in class AbstractMT
public final boolean isAck()
public final boolean isNack()
public java.lang.String getErrorCode()
public java.lang.String getErrorLine()