/** * Closes this channel. * * @throws IOException If an I/O error occurs */ @Override public void close() throws IOException { getIOChannel().socket().close(); getIOChannel().close(); }
/** * Closes this channel. * * @throws IOException If an I/O error occurs * TODO Implement this java.nio.channels.Channel method */ public void close() throws IOException { getIOChannel().socket().close(); getIOChannel().close(); }
/** * Closes this channel. * * @throws IOException If an I/O error occurs * TODO Implement this java.nio.channels.Channel method */ @Override public void close() throws IOException { getIOChannel().socket().close(); getIOChannel().close(); }
/** * Closes this channel. * * @throws IOException If an I/O error occurs * TODO Implement this java.nio.channels.Channel method */ @Override public void close() throws IOException { getIOChannel().socket().close(); getIOChannel().close(); }
/** * Closes this channel. * * @throws IOException If an I/O error occurs */ @Override public void close() throws IOException { getIOChannel().socket().close(); getIOChannel().close(); }
@Override protected void populateRemoteAddr() { InetAddress inetAddr = getSocket().getIOChannel().socket().getInetAddress(); if (inetAddr != null) { remoteAddr = inetAddr.getHostAddress(); } }
@Override protected void populateRemoteHost() { InetAddress inetAddr = getSocket().getIOChannel().socket().getInetAddress(); if (inetAddr != null) { remoteHost = inetAddr.getHostName(); if (remoteAddr == null) { remoteAddr = inetAddr.getHostAddress(); } } }
@Override protected void setSocketTimeout(int timeout) throws IOException { socket.getSocket().getIOChannel().socket().setSoTimeout(timeout); }
@Override protected void setSocketTimeout(int timeout) throws IOException { socket.getSocket().getIOChannel().socket().setSoTimeout(timeout); }
@Override protected void populateRemotePort() { remotePort = getSocket().getIOChannel().socket().getPort(); }
@Override protected void populateLocalPort() { localPort = getSocket().getIOChannel().socket().getLocalPort(); }
@Override protected void populateLocalName() { InetAddress inetAddr = getSocket().getIOChannel().socket().getLocalAddress(); if (inetAddr != null) { localName = inetAddr.getHostName(); } }
@Override protected void populateLocalAddr() { InetAddress inetAddr = getSocket().getIOChannel().socket().getLocalAddress(); if (inetAddr != null) { localAddr = inetAddr.getHostAddress(); } }
public Object getAttachment(boolean remove) { Poller pol = getPoller(); Selector sel = pol!=null?pol.getSelector():null; SelectionKey key = sel!=null?getIOChannel().keyFor(sel):null; Object att = key!=null?key.attachment():null; if (key != null && att != null && remove ) key.attach(null); return att; }
public Object getAttachment(boolean remove) { Poller pol = getPoller(); Selector sel = pol!=null?pol.getSelector():null; SelectionKey key = sel!=null?getIOChannel().keyFor(sel):null; Object att = key!=null?key.attachment():null; if (key != null && att != null && remove ) key.attach(null); return att; } /**
public Object getAttachment(boolean remove) { Poller pol = getPoller(); Selector sel = pol!=null?pol.getSelector():null; SelectionKey key = sel!=null?getIOChannel().keyFor(sel):null; Object att = key!=null?key.attachment():null; if (key != null && att != null && remove ) key.attach(null); return att; } /**
public Object getAttachment(boolean remove) { Poller pol = getPoller(); Selector sel = pol!=null?pol.getSelector():null; SelectionKey key = sel!=null?getIOChannel().keyFor(sel):null; Object att = key!=null?key.attachment():null; if (key != null && att != null && remove ) key.attach(null); return att; } /**
public Object getAttachment() { Poller pol = getPoller(); Selector sel = pol!=null?pol.getSelector():null; SelectionKey key = sel!=null?getIOChannel().keyFor(sel):null; Object att = key!=null?key.attachment():null; return att; }
public void add(final NioSocketWrapper key, final int ops, final KeyReference ref) { if ( key == null ) return; NioChannel nch = key.getSocket(); final SocketChannel ch = nch.getIOChannel(); if ( ch == null ) return; Runnable r = new RunnableAdd(ch, key, ops, ref); events.offer(r); wakeup(); }
public void remove(final NioSocketWrapper key, final int ops) { if ( key == null ) return; NioChannel nch = key.getSocket(); final SocketChannel ch = nch.getIOChannel(); if ( ch == null ) return; Runnable r = new RunnableRemove(ch, key, ops); events.offer(r); wakeup(); }