List of usage examples for java.nio.channels Channel isOpen
public boolean isOpen();
From source file:it.geosolutions.tools.io.file.IOUtils.java
/** * Close the specified input <code>FileChannel</code> * // w ww .j a v a 2 s. c o m * @throws IOException * in case something bad happens. */ public static void closeQuietly(Channel channel) throws IOException { Objects.notNull(channel); if (channel.isOpen()) channel.close(); }
From source file:org.apache.tajo.rpc.NettyClientBase.java
@Override public void close() { Channel channel = getChannel(); if (channel != null && channel.isOpen()) { LOG.debug("Proxy will be disconnected from remote " + channel.remoteAddress()); /* channelInactive receives event and then client terminates all the requests */ channel.close().syncUninterruptibly(); }/*from w w w. j av a 2 s .co m*/ }
From source file:org.geoserver.rest.util.IOUtils.java
/** * Close the specified input <code>FileChannel</code> * /* w w w .ja va 2 s. c o m*/ * @throws IOException in case something bad happens. */ public static void closeQuietly(Channel channel) throws IOException { inputNotNull(channel); if (channel.isOpen()) channel.close(); }