Package java.net

Examples of java.net.SocketTimeoutException


  }


  private void onResponseTimeout(MessageHandler internalResponseHandler) {
   
    SocketTimeoutException ste = new SocketTimeoutException("response timeout " + DataConverter.toFormatedDuration(internalResponseHandler.getTimeout()) + " reached");
   
    if (LOG.isLoggable(Level.FINE)) {
      LOG.fine(ste.getMessage());
    }
   
    performResponseTimeoutHandler(internalResponseHandler.getAppHandler(), ste);
  }
View Full Code Here


  @Override
  protected void onIdleTimeout() {

      // notify waiting handler
        for (MessageHeaderHandler messageHandler : getHandlersWaitingForResponseCopy()) {
            messageHandler.onException(new SocketTimeoutException("idle timeout " + DataConverter.toFormatedDuration(getIdleTimeoutMillis()) + " reached"));
        }
        handlersWaitingForResponseHeader.clear();

      super.onIdleTimeout();
  }
View Full Code Here

  @Override
  protected void onConnectionTimeout() {

    // notify waiting handler
    for (MessageHeaderHandler messageHandler : getHandlersWaitingForResponseCopy()) {
      messageHandler.onException(new SocketTimeoutException("connection timeout " + DataConverter.toFormatedDuration(getConnectionTimeoutMillis()) + " reached"));
    }
    handlersWaitingForResponseHeader.clear();

    super.onConnectionTimeout();
  }
View Full Code Here

  }
 

  private void onResponseTimeout(MessageHeaderHandler internalResponseHandler) {
   
    final SocketTimeoutException ste = new SocketTimeoutException("response timeout " + DataConverter.toFormatedDuration(internalResponseHandler.getTimeout()) + " reached");
   
    if (LOG.isLoggable(Level.FINE)) {
      LOG.fine(ste.getMessage());
    }
   
    internalResponseHandler.onException(ste);
        destroy();
    }
View Full Code Here

        }
        while ( buffer.hasRemaining() && (timePeriod < timeout) );

        if ( timePeriod >= timeout )
        {
            throw new SocketTimeoutException();
        }

        if ( buffer.hasRemaining() )
        {
            logger.log( Level.FINEST, "Incomplete write detected, registering for write again." );
View Full Code Here

            throw che;
        }

        if ( timePeriod >= timeout )
        {
            throw new SocketTimeoutException();
        }

        if ( buffer.hasRemaining() )
        {
            if ( read == -1 )
View Full Code Here

        while ( readControl > -1 && !HttpHeaderParser.isComplete( headerBuf ) && (timePeriod < timeout) );

        // timeout occured?
        if ( timePeriod >= timeout )
        {
            throw new SocketTimeoutException();
        }
        else if ( readControl == -1 && headerBuf.position() == 0 )
        {
            throw new ClosedChannelException();
        }
View Full Code Here

                    }
                }
               
            } while (System.currentTimeMillis() < (start + timeoutMillis));
           
            throw new SocketTimeoutException("colud not get a connection of channel " + channelId);
        }
View Full Code Here

                    }
                }
               
            } while (System.currentTimeMillis() < (start + timeoutMillis));
           
            throw new SocketTimeoutException("colud not get a connection of channel " + channelId);
        }
View Full Code Here

    if (LOG.isLoggable(Level.FINE)) {
      LOG.fine("receive timeout " + receiveTimeoutSec + " sec reached. throwing timeout exception");
    }

    throw new SocketTimeoutException("timeout " + receiveTimeoutSec + " sec reached");
  }
View Full Code Here

TOP

Related Classes of java.net.SocketTimeoutException

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.