@Override protected void doClose() throws IOException { channel.close(); } }
@Override protected void doClose() throws IOException { channel.close(); }
@Override public void close() throws IOException { getSocket().close(); }
public void close(boolean force) throws IOException { if (isOpen() || force ) close(); } /**
public void close(boolean force) throws IOException { if (isOpen() || force ) close(); } /**
/** * Close the connection. * * @param force Should the underlying socket be forcibly closed? * * @throws IOException If closing the secure channel fails. */ public void close(boolean force) throws IOException { if (isOpen() || force ) close(); }
public void close(boolean force) throws IOException { if (isOpen() || force ) close(); } /**
public void close(boolean force) throws IOException { if (isOpen() || force ) close(); } /**
public void close(boolean force) throws IOException { if (isOpen() || force ) close(); } /**
/** * Try to close this channel. If the channel is already closed or the * {@code force} parameter is false, nothing will happen. This method has an * impact only if the channel is open and the {@code force} parameter is * <tt>true</tt> * * @param force * a boolean value indicating if we need to force closing the * channel * @throws IOException */ public void close(boolean force) throws IOException { if (isOpen() && force) { this.close(); } }
/** * Close the specified channel and remove it from the list of open * connections * * @param channel * the channel to be closed */ public void closeChannel(NioChannel channel) { if (channel != null) { try { channel.close(); } catch (IOException e) { CoyoteLogger.UTIL_LOGGER.errorClosingSocket(e); } } }
public void cancelledKey(SelectionKey key, SocketStatus status, boolean dispatch) { try { if ( key == null ) return;//nothing to do KeyAttachment ka = (KeyAttachment) key.attachment(); if (ka != null && ka.getComet() && status != null) { //the comet event takes care of clean up //processSocket(ka.getChannel(), status, dispatch); ka.setComet(false);//to avoid a loop if (status == SocketStatus.TIMEOUT ) { processSocket(ka.getChannel(), status, true); return; // don't close on comet timeout } else { processSocket(ka.getChannel(), status, false); //don't dispatch if the lines below are cancelling the key } } key.attach(null); if (ka!=null) handler.release(ka.getChannel()); if (key.isValid()) key.cancel(); if (key.channel().isOpen()) try {key.channel().close();}catch (Exception ignore){} try {if (ka!=null) ka.channel.close(true);}catch (Exception ignore){} try {if (ka!=null && ka.getSendfileData()!=null && ka.getSendfileData().fchannel!=null && ka.getSendfileData().fchannel.isOpen()) ka.getSendfileData().fchannel.close();}catch (Exception ignore){} if (ka!=null) ka.reset(); } catch (Throwable e) { if ( log.isDebugEnabled() ) log.error("",e); // Ignore } } /**
ka.getSocket().close(true); } catch (Exception e){ if (log.isDebugEnabled()) {
ka.getSocket().close(true);
ka.getSocket().close(true);
ka.getSocket().close(true);
ka.getSocket().close(true);