コード例 #1
0
    public void run() {

      try {

        if (muxName != null) {
          MUX destMux = (MUX) NameRegistrar.get("mux." + muxName);

          ISOMsg response = null;

          if (isInquiry(m)) {
            jum_repeat_advice = 0;
          }
          if (isAdviceRepeat(m)) {
            jum_repeat_advice++;
          }
          response = destMux.request(m, timeout);

          if (response != null) {
            try {
              if (isPaymentOrAdvice(m)) {
                // if (jum_repeat_advice > 1) {
                //    source.send(response);
                // }
              } else {
                if (isAdviceRepeat(m)) {
                  if (jum_repeat_advice > 2) {
                    source.send(response);
                  }
                } else {
                  source.send(response);
                }
              }
            } catch (IOException ex) {
              Logger.getLogger(MyListenerInquiryComplete.class.getName())
                  .log(Level.SEVERE, null, ex);
            } catch (VetoException ex) {
              Logger.getLogger(MyListenerInquiryComplete.class.getName())
                  .log(Level.SEVERE, null, ex);
            }
          }
        } else if (channelName != null) {
          Channel destChannel = (Channel) NameRegistrar.get(channelName);
          destChannel.send(m);
        }
      } catch (NotFoundException ex) {
        Logger.getLogger(MyListenerInquiryComplete.class.getName()).log(Level.SEVERE, null, ex);
      } catch (ISOException e) {
        // evt.addMessage (e);

      }
      // Logger.log (evt);
    }
コード例 #2
0
    public void run() {

      try {

        if (muxName != null) {
          MUX destMux = (MUX) NameRegistrar.get("mux." + muxName);

          ISOMsg response = null;

          if (isReversal(m)) {
            Thread.sleep(Long.parseLong(delay));
          }
          if (!isReversalRepeat(m)) {
            response = destMux.request(m, timeout);
          }

          if (response != null) {
            try {
              if (!isPayment(m)) {
                source.send(response);
              }

            } catch (IOException ex) {
              Logger.getLogger(MyListenerReversalDelay.class.getName()).log(Level.SEVERE, null, ex);
            } catch (VetoException ex) {
              Logger.getLogger(MyListenerReversalDelay.class.getName()).log(Level.SEVERE, null, ex);
            }
          }
        } else if (channelName != null) {
          Channel destChannel = (Channel) NameRegistrar.get(channelName);
          destChannel.send(m);
        }
      } catch (InterruptedException ex) {
        Logger.getLogger(MyListenerReversalDelay.class.getName()).log(Level.SEVERE, null, ex);
      } catch (NotFoundException ex) {
        Logger.getLogger(MyListenerReversalDelay.class.getName()).log(Level.SEVERE, null, ex);
      } catch (ISOException e) {
        // evt.addMessage (e);

      }
      // Logger.log (evt);
    }