/** * {@inheritDoc} */ @Override public boolean isClosed() { if (isDone()) { return getValue() == CLOSED; } return false; }
/** * {@inheritDoc} */ @Override public Throwable getException() { if (isDone()) { Object v = getValue(); if (v instanceof Throwable) { return (Throwable)v; } } return null; }
public boolean isRead() { if (isDone()) { Object v = getValue(); return (v != CLOSED && !(v instanceof ExceptionHolder)); } return false; }
/** * {@inheritDoc} */ @Override public boolean isRead() { if (isDone()) { Object v = getValue(); return v != CLOSED && !(v instanceof Throwable); } return false; }
/** * {@inheritDoc} */ @Override public boolean isRead() { if (isDone()) { Object v = getValue(); return v != CLOSED && !(v instanceof Throwable); } return false; }
/** * {@inheritDoc} */ @Override public boolean isClosed() { if (isDone()) { return getValue() == CLOSED; } return false; }
public boolean isClosed() { if (isDone()) { return getValue() == CLOSED; } return false; }
public Throwable getException() { if (isDone()) { Object v = getValue(); if (v instanceof ExceptionHolder) { return ((ExceptionHolder) v).exception; } } return null; }
/** * {@inheritDoc} */ @Override public Throwable getException() { if (isDone()) { Object v = getValue(); if (v instanceof Throwable) { return (Throwable)v; } } return null; }
/** * {@inheritDoc} */ @Override public Object getMessage() { if (isDone()) { Object v = getValue(); if (v == CLOSED) { return null; } if (v instanceof RuntimeException) { throw (RuntimeException) v; } if (v instanceof Error) { throw (Error) v; } if (v instanceof IOException || v instanceof Exception) { throw new RuntimeIoException((Exception) v); } return v; } return null; }
public Object getMessage() { if (isDone()) { Object v = getValue(); if (v == CLOSED) { return null; } if (v instanceof ExceptionHolder) { v = ((ExceptionHolder) v).exception; if (v instanceof RuntimeException) { throw (RuntimeException) v; } if (v instanceof Error) { throw (Error) v; } if (v instanceof IOException || v instanceof Exception) { throw new RuntimeIoException((Exception) v); } } return v; } return null; }
/** * {@inheritDoc} */ @Override public Object getMessage() { if (isDone()) { Object v = getValue(); if (v == CLOSED) { return null; } if (v instanceof RuntimeException) { throw (RuntimeException) v; } if (v instanceof Error) { throw (Error) v; } if (v instanceof IOException || v instanceof Exception) { throw new RuntimeIoException((Exception) v); } return v; } return null; }