/** {@inheritDoc} */ @Override public void onTimeout() { if (done.compareAndSet(false, true)) { // Close socket - timeout occurred. if (obj instanceof GridCommunicationClient) ((GridCommunicationClient)obj).forceClose(); else U.closeQuiet((AbstractInterruptibleChannel)obj); } }
public Result testConstructor() throws IOException { AbstractInterruptibleChannel aic = new AbstractInterruptibleChannelImpl(); if (!aic.isOpen()) { return failed("newly created AbstractInterruptibleChannel should be open by default"); } return passed(); }