고정 길이 레코드의 FIX 메시지에서 정보 : 헤더, 본문 및 섹션을 나타내는 다른 섹션을 포함하는 것이 일반적입니다. 주석 @Section의 목적은 모델의 어떤 클래스가 헤더를 나타내는지 나타내는 바인딩(= 섹션 1), 본문(= 섹션 2) 및 바닥글(= 섹션 3)을 알리는 것입니다.
이 주석에 대해 하나의 속성/ 매개변수만 있습니다.
Expand
주석 이름
레코드 유형
level
섹션
FIX
class
Expand
매개변수 이름
type
정보
숫자
int
섹션 위치를 식별하는 숫자
케이스 1 : 섹션
header 섹션의 정의
FIX message - 섹션 - 헤더
@Section(number = 1)
public class Header {
@KeyValuePairField(tag = 8, position = 1) // Message Header
private String beginString;
@KeyValuePairField(tag = 9, position = 2) // Checksum
private int bodyLength;
}
@Section(number = 1)
public class Header {
@KeyValuePairField(tag = 8, position = 1) // Message Header
private String beginString;
@KeyValuePairField(tag = 9, position = 2) // Checksum
private int bodyLength;
}
Copy to ClipboardCopied!Toggle word wrapToggle overflow
본문 섹션에 대한 정의
FIX message - 섹션 - 본문
@Section(number = 2)
@Message(keyValuePairSeparator = "=", pairSeparator = "\\u0001", type = "FIX", version = "4.1", isOrdered = true)
public class Order {
@Link Header header;
@Link Trailer trailer;
@KeyValuePairField(tag = 1, position = 1) // Client reference
private String account;
@KeyValuePairField(tag = 11, position = 3) // Order reference
private String clOrdId;
@Section(number = 2)
@Message(keyValuePairSeparator = "=", pairSeparator = "\\u0001", type = "FIX", version = "4.1", isOrdered = true)
public class Order {
@Link Header header;
@Link Trailer trailer;
@KeyValuePairField(tag = 1, position = 1) // Client reference
private String account;
@KeyValuePairField(tag = 11, position = 3) // Order reference
private String clOrdId;
Copy to ClipboardCopied!Toggle word wrapToggle overflow
바닥글 섹션에 대한 정의
수정 메시지 - 섹션 - Footer
@Section(number = 3)
public class Trailer {
@KeyValuePairField(tag = 10, position = 1)
// CheckSum
private int checkSum;
public int getCheckSum() {
return checkSum;
}
@Section(number = 3)
public class Trailer {
@KeyValuePairField(tag = 10, position = 1)
// CheckSum
private int checkSum;
public int getCheckSum() {
return checkSum;
}
Copy to ClipboardCopied!Toggle word wrapToggle overflow