@Test public void testBindInetAddress() throws Exception { InetAddress inetAddress = InetAddress.getLoopbackAddress(); sniffySocket.bind(inetAddress, 123); verifyPrivate(delegate).invoke("bind", inetAddress, 123); verifyNoMoreInteractions(delegate); }
@Override protected void bind(InetAddress host, int port) throws IOException { copyToDelegate(); long start = System.currentTimeMillis(); try { method("bind", InetAddress.class, int.class).invoke(delegate, host, port); } catch (Exception e) { ExceptionUtil.processException(e); } finally { logSocket(System.currentTimeMillis() - start); copyFromDelegate(); } }
SnifferSocketImpl extends SocketImpl implements SniffySocket { @Override protected void bind(InetAddress host, int port) throws IOException { copyToDelegate(); long start = System.currentTimeMillis(); try { method("bind", InetAddress.class, int.class).invoke(delegate, host, port); } catch (Exception e) { ExceptionUtil.processException(e); } finally { logSocket(System.currentTimeMillis() - start); copyFromDelegate(); } } }
SnifferSocketImpl extends SocketImpl implements SniffySocket { @Override protected void bind(InetAddress host, int port) throws IOException { copyToDelegate(); long start = System.currentTimeMillis(); try { method("bind", InetAddress.class, int.class).invoke(delegate, host, port); } catch (Exception e) { ExceptionUtil.processException(e); } finally { logSocket(System.currentTimeMillis() - start); copyFromDelegate(); } } protected  SnifferSocketImpl(SocketImpl delegate); }
SnifferSocketImpl extends SocketImpl implements SniffySocket { @Override protected void bind(InetAddress host, int port) throws IOException { copyToDelegate(); long start = System.currentTimeMillis(); try { method("bind", InetAddress.class, int.class).invoke(delegate, host, port); } catch (Exception e) { ExceptionUtil.processException(e); } finally { logSocket(System.currentTimeMillis() - start); copyFromDelegate(); } } protected  SnifferSocketImpl(SocketImpl delegate); @Override void setConnectionStatus(Integer connectionStatus); @Override String toString(); @Override void setOption(int optID, Object value); @Override Object getOption(int optID); @Override InetSocketAddress getInetSocketAddress(); }
SnifferSocketImpl extends SocketImpl implements SniffySocket { @Override protected void bind(InetAddress host, int port) throws IOException { copyToDelegate(); long start = System.currentTimeMillis(); try { method("bind", InetAddress.class, int.class).invoke(delegate, host, port); } catch (Exception e) { ExceptionUtil.processException(e); } finally { logSocket(System.currentTimeMillis() - start); copyFromDelegate(); } } protected  SnifferSocketImpl(SocketImpl delegate); @Override void setConnectionStatus(Integer connectionStatus); @Override String toString(); @Override void setOption(int optID, Object value); @Override Object getOption(int optID); @Override InetSocketAddress getInetSocketAddress();  }