コード例 #1
0
ファイル: LoopbackChannel.java プロジェクト: nachmadi/jPOS
 public void send(byte[] b) throws IOException, ISOException, VetoException {
   if (!isConnected()) throw new ISOException("unconnected ISOChannel");
   LogEvent evt = new LogEvent(this, "loopback-send", b);
   queue.enqueue(b);
   cnt[TX]++;
   notifyObservers();
   Logger.log(evt);
 }
コード例 #2
0
ファイル: LoopbackChannel.java プロジェクト: nachmadi/jPOS
 public void send(ISOMsg m) throws IOException, ISOException, VetoException {
   if (!isConnected()) throw new ISOException("unconnected ISOChannel");
   LogEvent evt = new LogEvent(this, "loopback-send", m);
   m = applyOutgoingFilters(m, evt);
   queue.enqueue(m);
   cnt[TX]++;
   notifyObservers();
   Logger.log(evt);
 }
コード例 #3
0
ファイル: LoopbackChannel.java プロジェクト: nachmadi/jPOS
 public ISOMsg receive() throws IOException, ISOException {
   if (!isConnected()) throw new ISOException("unconnected ISOChannel");
   try {
     ISOMsg m = (ISOMsg) ((ISOMsg) queue.dequeue()).clone();
     LogEvent evt = new LogEvent(this, "loopback-receive", m);
     m = applyIncomingFilters(m, evt);
     cnt[RX]++;
     notifyObservers();
     Logger.log(evt);
     return m;
   } catch (InterruptedException e) {
     throw new IOException(e.toString());
   } catch (BlockingQueue.Closed e) {
     throw new IOException(e.toString());
   }
 }