Package pt.opensoft.util

Examples of pt.opensoft.util.Timer.start()


        final CGISocket protocol = new CGISocket(address, CONNECT_TIMEOUT);
        protocol.setTimeout(CONNECT_TIMEOUT);
        String response = "";
        try {
          Timer timer = new Timer();
          timer.start();
          // write message request to server
          String request = (String) iterator.next();
          if (request != null) _logger.info(timer.ellapsed(), "[SENT] {" + request + "}");
          protocol.write(request);
          // read message response from server
View Full Code Here


   
    HttpResponse response = null;
    Exception ex = null;
   
    Timer timer = new Timer();
    timer.start();

    boolean timeout = false;
    try {
      if (isDebug()) {
        this.logger.setLevel(Level.DEBUG);
View Full Code Here

        if (!storage.hasProductsToConsume()) {
          logger.info("FINISHED: NO MORE PRODUCTS");
          return;
        }
        Timer timer = new Timer();
        timer.start();
        Object product = storage.retrieve();
        if (product == null) {
          logger.info("FINISHED: NO MORE PRODUCTS TO CONSUME");
          return;
        }
View Full Code Here

          logger.info("FINISHED: NO MORE PRODUCTS TO CONSUME");
          return;
        }
        Exception exception = null;
        do {
          if (exception != null) timer.start();
          try {
            consume(product);
            exception = null;
          } catch (Exception e) {
            exception = e;
View Full Code Here

  public void run () {
    Timer timer = new Timer();
    try {
      String response = null;
      try {
        timer.start();
        _socket.setTimeout(timeout);
        String request = _socket.read();
        request = StringUtil.toString_ISO_8859_1(request);
        //request = StringUtil.toString_CP_850(request);
       
View Full Code Here

        return "" + reqCode.charAt(0) + numericPart + reqCode.substring(CODE_LENGTH);
    }
   
    protected String send (String request) throws HostException {
    Timer totalTimer = new Timer();
    totalTimer.start();
    Timer sendTimer = new Timer();
    sendTimer.start();
    Timer receiveTimer = new Timer();
    String response = null;
    boolean tooLongAlreadyDumped = false;
View Full Code Here

   
    protected String send (String request) throws HostException {
    Timer totalTimer = new Timer();
    totalTimer.start();
    Timer sendTimer = new Timer();
    sendTimer.start();
    Timer receiveTimer = new Timer();
    String response = null;
    boolean tooLongAlreadyDumped = false;
       
    try {
View Full Code Here

        socket.setTimeout(timeout);
        request = transformRequest(request);
        socket.write(request);
        sendTimer.stop();
        logger.finer(sendTimer.ellapsed(), "[SENT] {" + request + "} (len=" + request.length() + ")");
        receiveTimer.start();
        response = socket.read();
        response = transformResponse(response);
                receiveTimer.stop();
      } finally {
        socket.close();
View Full Code Here

   * @throws java.sql.SQLException if a database-access error occurs.
   */

  public ResultSet executeQuery () throws SQLException {
    Timer timer = new Timer();
    timer.start();
    ResultSet results = null;
    Exception ex = null;
    Logger logger = _dbc.getLogger();
    logger.push("query");
    try {
View Full Code Here

   * @throws java.sql.SQLException if a database-access error occurs.
   */

  public int executeUpdate () throws SQLException {
    Timer timer = new Timer();
    timer.start();
    if(_doQueryTimeout)
    _stmt.setQueryTimeout(_queryTimeout);
    int count = 0;
    Exception ex = null;
    Logger logger = _dbc.getLogger();
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.