Package java.util.concurrent

Examples of java.util.concurrent.ExecutionException


   */
  public IHttpResponse get() throws InterruptedException, ExecutionException {
      try {
          return getResponse();
      } catch (IOException ioe) {
          throw new ExecutionException(ioe.toString(), ioe);
      }
  }
View Full Code Here


      try {
            return getResponse(timeout, unit);
        } catch (SocketTimeoutException stoe) {
            throw new TimeoutException(stoe.toString());
        } catch (IOException ioe) {
            throw new ExecutionException(ioe.toString(), ioe);
        }
  }
View Full Code Here

   */
  public IHttpResponse get() throws InterruptedException, ExecutionException {
      try {
          return getResponse();
      } catch (IOException ioe) {
          throw new ExecutionException(ioe.toString(), ioe);
      }
  }
View Full Code Here

      try {
            return getResponse(timeout, unit);
        } catch (SocketTimeoutException stoe) {
            throw new TimeoutException(stoe.toString());
        } catch (IOException ioe) {
            throw new ExecutionException(ioe.toString(), ioe);
        }
  }
View Full Code Here

            service.shutdown();
            try {
                return taskFuture.get(timeout, TimeUnit.MILLISECONDS);
            } catch (final CancellationException e) {
                // callable was interrupted
                throw new ExecutionException(e);
            } catch (final InterruptedException e) {
                // service was shutdown
                throw new ExecutionException(e);
            } catch (final ExecutionException e) {
                // callable failed unexpectedly
                throw e;
            } catch (final TimeoutException e) {
                // time-out
                throw new ExecutionException(e);
            }
        } catch (final OutOfMemoryError e) {
            org.apache.log4j.Logger.getLogger(TimeoutRequest.class).warn("OutOfMemoryError / retry follows", e);
            // in case that no memory is there to create a new native thread
            try {
                return this.call.call();
            } catch (final Exception e1) {
                throw new ExecutionException(e1);
            }
        }
    }
View Full Code Here

   */
  public IHttpResponse get() throws InterruptedException, ExecutionException {
      try {
          return getResponse();
      } catch (IOException ioe) {
          throw new ExecutionException(ioe.toString(), ioe);
      }
  }
View Full Code Here

      try {
            return getResponse(timeout, unit);
        } catch (SocketTimeoutException stoe) {
            throw new TimeoutException(stoe.toString());
        } catch (IOException ioe) {
            throw new ExecutionException(ioe.toString(), ioe);
        }
  }
View Full Code Here

      while (_result == null)
      {
        _resultReceived.await();
      }
      if (_result.getFault() != null)
        throw new ExecutionException(_result.getFault());
      else
        return _result.getValue();
    }
    finally
    {
View Full Code Here

      if (_result == null)
        _resultReceived.await(timeout, unit);
      if (_result == null)
        throw new TimeoutException();
      if (_result.getFault() != null)
        throw new ExecutionException(_result.getFault());
      else
        return _result.getValue();
    }
    finally
    {
View Full Code Here

          }
        }
      }

      if (_exception != null)
        throw new ExecutionException(_exception);
      else if (_isDone)
        return _value;
      else if (_isCancelled)
        throw new CancellationException();
      else
View Full Code Here

TOP

Related Classes of java.util.concurrent.ExecutionException

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.