Class LogicalTerminalAddress
- java.lang.Object
-
- com.prowidesoftware.swift.model.BIC
-
- com.prowidesoftware.swift.model.LogicalTerminalAddress
-
public class LogicalTerminalAddress extends BIC
Identifies a logical channel connection to SWIFT, and the network uses it for addressing. It is basically a BIC code with an additional character identifier the terminal sending the message. The LT identifier is located in position 9 of a full 12 characters address. For example letter 'A' in CCCCUS33AXXX
A sender LT address cannot have 'X' as LT identifier as it is a reserved character for LT wildcard. SWIFT NAK the messages with H10 error when messages sent to their network. However, messages to Messaging Interface can have 'X' as Sender LT Identifier that will be used as wild card to load balance the LTs and replaced by Messaging Interface before sending to SWIFT to the corresponding LT Value. A receiver LT address must have an 'X' as LT identifier.
- Since:
- 7.6
-
-
Field Summary
-
Fields inherited from class com.prowidesoftware.swift.model.BIC
branch, PARTNER_PREFIX, TEST12, TEST8
-
-
Constructor Summary
Constructors Constructor Description LogicalTerminalAddress(java.lang.String code)
Creates an LT address from its string value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.Character
getLTIdentifier()
java.lang.String
getReceiverLogicalTerminalAddress()
Returns a proper LT address for the receiver of a message, assuring the returned code has 12 characters and with a fixed "X" in the 9th position.java.lang.String
getSenderLogicalTerminalAddress()
Returns a proper LT address for the sender of a message, assuring the returned code has 12 characters.int
hashCode()
void
setLTIdentifier(java.lang.Character _lTIdentifier)
-
Methods inherited from class com.prowidesoftware.swift.model.BIC
asTestBic, distinguishedName, distinguishedName, getBic11, getBic8, getBranch, getBranchOrDefault, getCountry, getInstitution, getLocation, getSubtype, isLive, isNonLive, isTestAndTraining, isValid, parse, setBranch, setCountry, setInstitution, setLocation, setSubtype, toString, validate
-
-
-
-
Constructor Detail
-
LogicalTerminalAddress
public LogicalTerminalAddress(java.lang.String code)
Creates an LT address from its string value.If the string contains a BIC8 or BIC11 the LT identifier will be set with a default value. If the BIC has 12 characters, then the LT and branch is extracted from the parameter code. Finally if the BIC has a special size of 9 characters, that is parsed as the BIC8 plus the LT identifier, letting the branch with default.
- Parameters:
code
- a full LT address code (12 characters) or a BIC8, BIC11 or BIC8 plus LT identifier
-
-
Method Detail
-
getLTIdentifier
public java.lang.Character getLTIdentifier()
-
setLTIdentifier
public void setLTIdentifier(java.lang.Character _lTIdentifier)
-
getSenderLogicalTerminalAddress
public java.lang.String getSenderLogicalTerminalAddress()
Returns a proper LT address for the sender of a message, assuring the returned code has 12 characters.If the terminal identifier is not set, then the wildcard LT identifier "X" will be used.
The branch code is padded with "XXX" if not present.
- Returns:
- the 12 characters address or null if the BIC has less than 8 characters
-
getReceiverLogicalTerminalAddress
public java.lang.String getReceiverLogicalTerminalAddress()
Returns a proper LT address for the receiver of a message, assuring the returned code has 12 characters and with a fixed "X" in the 9th position.The branch code is padded with "XXX" if not present.
- Returns:
- the 12 characters address or null if the BIC has less than 8 characters
-
-