/** * {@inheritDoc} */ @Override public Throwable getException() { Object v = getValue(); if (v instanceof Throwable) { return (Throwable) v; } else { return null; } }
/** * {@inheritDoc} */ @Override public boolean isCanceled() { return getValue() == CANCELED; }
/** * {@inheritDoc} */ @Override public boolean isCanceled() { return getValue() == CANCELED; }
/** * {@inheritDoc} */ @Override public boolean isConnected() { return getValue() instanceof IoSession; }
public Throwable getException() { Object v = getValue(); if (v instanceof Throwable) { return (Throwable) v; } else { return null; } }
/** * {@inheritDoc} */ @Override public boolean isConnected() { return getValue() instanceof IoSession; }
/** * {@inheritDoc} */ @Override public Throwable getException() { Object v = getValue(); if (v instanceof Throwable) { return (Throwable) v; } else { return null; } }
public boolean isConnected() { return getValue() instanceof IoSession; }
public boolean isCanceled() { return getValue() == CANCELED; }
/** * {@inheritDoc} */ @Override public IoSession getSession() { Object v = getValue(); if (v instanceof IoSession) { return (IoSession) v; } else if (v instanceof RuntimeException) { throw (RuntimeException) v; } else if (v instanceof Error) { throw (Error) v; } else if (v instanceof Throwable) { throw (RuntimeIoException) new RuntimeIoException("Failed to get the session.").initCause((Throwable) v); } else { return null; } }
@Override public IoSession getSession() { Object v = getValue(); if (v instanceof RuntimeException) { throw (RuntimeException) v; } else if (v instanceof Error) { throw (Error) v; } else if (v instanceof Throwable) { throw (RuntimeIoException) new RuntimeIoException( "Failed to get the session.").initCause((Throwable) v); } else if (v instanceof IoSession) { return (IoSession) v; } else { return null; } }
/** * {@inheritDoc} */ @Override public IoSession getSession() { Object v = getValue(); if (v instanceof IoSession) { return (IoSession) v; } else if (v instanceof RuntimeException) { throw (RuntimeException) v; } else if (v instanceof Error) { throw (Error) v; } else if (v instanceof Throwable) { throw (RuntimeIoException) new RuntimeIoException("Failed to get the session.").initCause((Throwable) v); } else { return null; } }