public class MIR extends Object
MIR and MOR are messages unique identifiers containing the date, logical terminal (including branch code), session and sequence numbers. Nevertheless this identifiers can be confusing sometimes because they must be thought from SWIFT perspective.
A message created by the sender user/application is considered an INPUT message, because it gets into the SWIFT network. When the message is delivered and gets out of the network it is considered an OUTPUT message. Therefore the headers of a sent message are not exactly the same as the headers of the received message at the destination party. Analogous the headers of a message that the receiving user/application gets from SWIFT are not exactly the same as the headers when the message was created and sent by the sending party.
The usage of MIR and MOR are clear when analyzing system messages.
A non delivery warning for example, includes the original MIR of the
sent message, but not the MOR because the message was not delivered yet.
But a delivery confirmation on the other hand, includes both, the sender’s MIR
and the receiver’s MOR.
System messages provide MIR/MOR information using fields 106 and 107 respectively.
Constructor and Description |
---|
MIR()
Default constructor
|
MIR(String value)
Creates a MIR object parsing the literal string value.
|
MIR(String date,
String logicalTerminal,
String sessionNumber,
String sequenceNumber) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getDate() |
Calendar |
getDateAsCalendar()
Returns this MIR date as Calendar.
|
String |
getLogicalTerminal() |
String |
getMIR()
Gets the full MIR (Message Input Reference) string of 28
characters containing the sender's date, LT address,
session and sequence:
for example YYMMDDBANKBEBBAXXX2222123456 |
String |
getSequenceNumber() |
String |
getSessionNumber() |
int |
hashCode() |
void |
setDate(String date) |
void |
setLogicalTerminal(String logicalTerminal) |
void |
setSequenceNumber(String sequenceNumber) |
void |
setSessionNumber(String sessionNumber) |
public MIR(String date, String logicalTerminal, String sessionNumber, String sequenceNumber)
date
- logicalTerminal
- sessionNumber
- sequenceNumber
- public MIR(String value)
value
- the MIR value, it is expected to 28 characters lengthpublic MIR()
public String getDate()
public void setDate(String date)
date
- public String getLogicalTerminal()
public void setLogicalTerminal(String logicalTerminal)
logicalTerminal
- public String getSessionNumber()
public void setSessionNumber(String sessionNumber)
sessionNumber
- public String getSequenceNumber()
public void setSequenceNumber(String sequenceNumber)
sequenceNumber
- public String getMIR()
null
if all MIR components are null
public final Calendar getDateAsCalendar()
SwiftFormatUtils.getDate2(String)
null
if MIR date is invalid or not set