Package com.ecyrd.speed4j

Examples of com.ecyrd.speed4j.StopWatch.stop()


            // store message
            messageDAO.put(mailbox, messageId, message, env.getMessageInputStream());

            // successfully delivered
            stopWatch.stop("DELIVERY.success", logMsg);
            reply = DeliveryReturnCode.OK;
          } catch (OverQuotaException e) {
            // account is over quota, reject
            stopWatch.stop("DELIVERY.reject_overQuota", logMsg + " over quota");
            reply = DeliveryReturnCode.OVER_QUOTA;
View Full Code Here


            // successfully delivered
            stopWatch.stop("DELIVERY.success", logMsg);
            reply = DeliveryReturnCode.OK;
          } catch (OverQuotaException e) {
            // account is over quota, reject
            stopWatch.stop("DELIVERY.reject_overQuota", logMsg + " over quota");
            reply = DeliveryReturnCode.OVER_QUOTA;
          } catch (IOException e) {
            // delivery error, defer
            stopWatch.stop("DELIVERY.defer", logMsg);
            logger.error("DID" + deliveryId + ": delivery error: ", e);
View Full Code Here

            // account is over quota, reject
            stopWatch.stop("DELIVERY.reject_overQuota", logMsg + " over quota");
            reply = DeliveryReturnCode.OVER_QUOTA;
          } catch (IOException e) {
            // delivery error, defer
            stopWatch.stop("DELIVERY.defer", logMsg);
            logger.error("DID" + deliveryId + ": delivery error: ", e);
            reply = DeliveryReturnCode.TEMPORARY_FAILURE;
          }
          break;
        case DISCARD:
View Full Code Here

            reply = DeliveryReturnCode.TEMPORARY_FAILURE;
          }
          break;
        case DISCARD:
          // Local delivery is disabled.
          stopWatch.stop("DELIVERY.discard", logMsg);
          reply = DeliveryReturnCode.OK;
          break;
        case DEFER:
          // Delivery to mailbox skipped. Let MTA retry again later.
          stopWatch.stop("DELIVERY.defer", logMsg);
View Full Code Here

          stopWatch.stop("DELIVERY.discard", logMsg);
          reply = DeliveryReturnCode.OK;
          break;
        case DEFER:
          // Delivery to mailbox skipped. Let MTA retry again later.
          stopWatch.stop("DELIVERY.defer", logMsg);
          reply = DeliveryReturnCode.TEMPORARY_FAILURE;
          break;
        case REJECT:
          // Reject delivery. Account or mailbox not found.
          stopWatch.stop("DELIVERY.reject_nonExistent", logMsg + " unknown mailbox");
View Full Code Here

          stopWatch.stop("DELIVERY.defer", logMsg);
          reply = DeliveryReturnCode.TEMPORARY_FAILURE;
          break;
        case REJECT:
          // Reject delivery. Account or mailbox not found.
          stopWatch.stop("DELIVERY.reject_nonExistent", logMsg + " unknown mailbox");
          reply = DeliveryReturnCode.NO_SUCH_USER;
        }
      } catch (Exception e) {
        stopWatch.stop("DELIVERY.defer_failure", logMsg);
        reply = DeliveryReturnCode.TEMPORARY_FAILURE;
View Full Code Here

          // Reject delivery. Account or mailbox not found.
          stopWatch.stop("DELIVERY.reject_nonExistent", logMsg + " unknown mailbox");
          reply = DeliveryReturnCode.NO_SUCH_USER;
        }
      } catch (Exception e) {
        stopWatch.stop("DELIVERY.defer_failure", logMsg);
        reply = DeliveryReturnCode.TEMPORARY_FAILURE;
        logger.error("DID" + deliveryId + ": delivery failed (defered): ", e);
      }

      replies.put(recipient, reply); // set delivery status for invoker
View Full Code Here

      }
 
      // authenticate user with password
      mailbox = authenticator.authenticate(username, password);
 
      stopWatch.stop("AUTH.success");

      // return POP3 handler for mailbox
      return backend.getMailboxHander(mailbox);
    } catch (IllegalArgumentException iae) {
      stopWatch.stop("AUTH.fail");
View Full Code Here

      stopWatch.stop("AUTH.success");

      // return POP3 handler for mailbox
      return backend.getMailboxHander(mailbox);
    } catch (IllegalArgumentException iae) {
      stopWatch.stop("AUTH.fail");
      logger.debug("POP3 Authentication failed. Invalid username [{}]: {}", username, iae.getMessage());
      return null;
    } catch (AuthenticationException ae) {
      stopWatch.stop("AUTH.fail");
      logger.debug("POP3 Authentication failed. Invalid username [{}] or password [{}]", username, password);
View Full Code Here

    } catch (IllegalArgumentException iae) {
      stopWatch.stop("AUTH.fail");
      logger.debug("POP3 Authentication failed. Invalid username [{}]: {}", username, iae.getMessage());
      return null;
    } catch (AuthenticationException ae) {
      stopWatch.stop("AUTH.fail");
      logger.debug("POP3 Authentication failed. Invalid username [{}] or password [{}]", username, password);
      return null;
    }
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.