Package org.jpos.util

Examples of org.jpos.util.LogEvent


        new SimpleMsg("parameter", "PVK", pvk),
        new SimpleMsg("parameter", "Decimalisation table", decTab),
        new SimpleMsg("parameter", "PIN validation data", pinValData),
        new SimpleMsg("parameter", "Minimum PIN length", minPinLen)
      };
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Derive a PIN Using the IBM Method", cmdParameters));
      EncryptedPIN result = null;
      try {
        result = deriveIBMPINImpl(accountNo, pvk, decTab,  pinValData, minPinLen,  offset);
        evt.addMessage(new SimpleMsg("result", "Derived PIN", result));
      } catch (Exception e) {
        evt.addMessage(e);
        throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
        Logger.log(evt);
      }
      return result;
View Full Code Here


            new SimpleMsg("parameter", "cvk-a", cvkA == null ? "" : cvkA),
            new SimpleMsg("parameter", "cvk-b", cvkB == null ? "" : cvkB),
            new SimpleMsg("parameter", "Exp date", expDate),
            new SimpleMsg("parameter", "Service code", serviceCode)
      };
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Calculate CVV/CVC", cmdParameters));
      String result = null;
      try {
        result = calculateCVVImpl(accountNo, cvkA, cvkB, expDate, serviceCode);
        evt.addMessage(new SimpleMsg("result", "Calculated CVV/CVC", result));
      } catch (Exception e) {
        evt.addMessage(e);
        throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
        Logger.log(evt);
      }
      return result;
View Full Code Here

      cmdParameters.add(new SimpleMsg("parameter", "account number", accountNo));
      cmdParameters.add(new SimpleMsg("parameter", "cvk", cvk == null ? "" : cvk));
      cmdParameters.add(new SimpleMsg("parameter", "unpredictable number", upn));
      cmdParameters.add(new SimpleMsg("parameter", "auth rc", authrc));
      cmdParameters.add(new SimpleMsg("parameter", "second factor auth rc", sfarc));
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Calculate CAVV/AAV", cmdParameters));
      String result = null;
      try {
          result = calculateCAVVImpl(accountNo, cvk, upn, authrc, sfarc);
          evt.addMessage(new SimpleMsg("result", "Calculated CAVV/AAV", result));
      } catch (Exception e) {
          evt.addMessage(e);
          throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
          Logger.log(evt);
      }
      return result;
View Full Code Here

    public BSHTransactionParticipant() {
        super();
    }
   
    public void abort(long id, java.io.Serializable context) {
        LogEvent ev = new LogEvent(this, "abort");
        if (abortMethod != null) {
            try {
                executeMethod(abortMethod, id, context, ev, "");
            } catch (Exception ex) {
                ev.addMessage(ex);
            }
        } else {
            defaultAbort(id, context, ev);
        }
        if (trace)
View Full Code Here

            new SimpleMsg("parameter", "cvk-b", cvkB == null ? "" : cvkB),
            new SimpleMsg("parameter", "CVV/CVC", cvv),
            new SimpleMsg("parameter", "Exp date", expDate),
            new SimpleMsg("parameter", "Service code", serviceCode)
      };
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Verify CVV/CVC", cmdParameters));
      try {
        boolean r = verifyCVVImpl(accountNo, cvkA, cvkB, cvv, expDate, serviceCode);
        evt.addMessage(new SimpleMsg("result", "Verification status", r ? "valid" : "invalid"));
        return r;
      } catch (Exception e) {
        evt.addMessage(e);
        throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
        Logger.log(evt);
      }
    }
View Full Code Here

    }
   
    protected void defaultAbort(long id, Serializable context, LogEvent ev) {}
   
    public void commit(long id, java.io.Serializable context) {
        LogEvent ev = new LogEvent(this, "commit");
        if (commitMethod != null) {
            try {
                executeMethod(commitMethod, id, context, ev, "");
            } catch (Exception ex) {
                ev.addMessage(ex);
            }
        } else {
            defaultCommit(id, context, ev);
        }
        if (trace)
View Full Code Here

    }
   
    protected void defaultCommit(long id, Serializable context, LogEvent ev) {}
   
    public int prepare(long id, java.io.Serializable context) {
        LogEvent ev = new LogEvent(this, "prepare");
        int result = ABORTED | READONLY;
        if (prepareMethod != null) {
            try {
                result = (Integer) executeMethod(prepareMethod, id, context, ev, "result");
            } catch (Exception ex) {
                ev.addMessage(ex);
            }
        } else {
            result = defaultPrepare(id, context, ev);
        }
        ev.addMessage("result", Integer.toBinaryString(result));
        if (trace)
            Logger.log(ev);
        return result;
    }
View Full Code Here

            Logger.log(ev);
        return result;
    }

    public int prepareForAbort(long id, java.io.Serializable context) {
        LogEvent ev = new LogEvent(this, "prepare-for-abort");
        int result = ABORTED | READONLY;
        if (prepareForAbortMethod != null) {
            try {
                result = (Integer) executeMethod(prepareForAbortMethod, id, context, ev, "result");
            } catch (Exception ex) {
                ev.addMessage(ex);
            }
        }
        ev.addMessage("result", Integer.toBinaryString(result));
        if (trace)
            Logger.log(ev);
        return result;
    }
View Full Code Here

      cmdParameters.add(new SimpleMsg("parameter", "cvk", cvk == null ? "" : cvk));
      cmdParameters.add(new SimpleMsg("parameter", "cavv", cavv == null ? "" : cavv));
      cmdParameters.add(new SimpleMsg("parameter", "unpredictable number", upn));
      cmdParameters.add(new SimpleMsg("parameter", "auth rc", authrc));
      cmdParameters.add(new SimpleMsg("parameter", "second factor auth rc", sfarc));
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Verify CAVV/AAV", cmdParameters));
      boolean r = false;
      try {
          r = verifyCAVVImpl(accountNo, cvk, cavv, upn, authrc, sfarc);
          evt.addMessage(new SimpleMsg("result", "Verification status", r));
      } catch (Exception e) {
          evt.addMessage(e);
          throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
          Logger.log(evt);
      }
      return r;
View Full Code Here

            new SimpleMsg("parameter", "Exp date", expDate),
            new SimpleMsg("parameter", "Service code", serviceCode),
            new SimpleMsg("parameter", "atc", atc == null ? "" : ISOUtil.hexString(atc)),
            new SimpleMsg("parameter", "mkd method", mkdm)
      };
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Verify dCVV", cmdParameters));
      try {
        boolean r = verifydCVVImpl(accountNo, imkac, dcvv, expDate, serviceCode, atc, mkdm);
        evt.addMessage(new SimpleMsg("result", "Verification status", r ? "valid" : "invalid"));
        return r;
      } catch (Exception e) {
        evt.addMessage(e);
        throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
        Logger.log(evt);
      }
    }
View Full Code Here

TOP

Related Classes of org.jpos.util.LogEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.