コード例 #1
0
 public void onMessage(quickfix.fix43.SecurityDefinition message, SessionID sessionID)
     throws FieldNotFound, UnsupportedMessageType, IncorrectTagValue {
   quickfix.fix43.SecurityDefinition echo = message;
   try {
     Session.sendToTarget(echo, sessionID);
   } catch (SessionNotFound snf) {
     snf.printStackTrace();
   }
 }
コード例 #2
0
  public void process(Message message, SessionID sessionID) throws FieldNotFound {
    quickfix.Message echo = (quickfix.Message) message.clone();
    PossResend possResend = new PossResend(false);
    if (message.getHeader().isSetField(possResend)) message.getHeader().getField(possResend);

    ClOrdID clOrdID = new ClOrdID();
    message.getField(clOrdID);

    Pair pair = new Pair(clOrdID, sessionID);

    if (possResend.getValue() == true) {
      if (orderIDs.contains(pair)) return;
    }
    orderIDs.add(pair);
    try {
      Session.sendToTarget(echo, sessionID);
    } catch (SessionNotFound snf) {
    }
  }