private static SocketException rethrowAsSocketException(Exception ex) throws SocketException { SocketException result = new SocketException(); result.initCause(ex); throw result; }
@Override public void setKeepAlive(boolean on) throws SocketException { try { channel.setOption(UnixSocketOptions.SO_KEEPALIVE, Boolean.valueOf(on)); } catch (IOException e) { throw (SocketException)new SocketException().initCause(e); } }
@Override public void setSoTimeout(int timeout) throws SocketException { try { channel.setOption(UnixSocketOptions.SO_RCVTIMEO, Integer.valueOf(timeout)); } catch (IOException e) { throw (SocketException)new SocketException().initCause(e); } }
@Override public int getSoTimeout() throws SocketException { try { return channel.getOption(UnixSocketOptions.SO_RCVTIMEO).intValue(); } catch (IOException e) { throw (SocketException)new SocketException().initCause(e); } }
@Override public boolean getKeepAlive() throws SocketException { try { return channel.getOption(UnixSocketOptions.SO_KEEPALIVE).booleanValue(); } catch (IOException e) { throw (SocketException)new SocketException().initCause(e); } }
final SocketException se = new SocketException(getOSType() + ": failed to set " + opt + " to " + value); se.initCause(ne); failures.put(opt, se);
final SocketException se = new SocketException(getOSType() + ": failed to set options: " + optValueMap); se.initCause(le); error = se;
private static SocketException rethrowAsSocketException(Exception ex) throws SocketException { SocketException result = new SocketException(); result.initCause(ex); throw result; }
private static SocketException rethrowAsSocketException(Exception ex) throws SocketException { SocketException result = new SocketException(); result.initCause(ex); throw result; }
private static SocketException rethrowAsSocketException(Exception ex) throws SocketException { SocketException result = new SocketException(); result.initCause(ex); throw result; }
private static SocketException rethrowAsSocketException(Exception ex) throws SocketException { SocketException result = new SocketException(); result.initCause(ex); throw result; }
private static int expectBoolean(Object value) throws SocketException { try { return ((Boolean) value).booleanValue() ? 1 : 0; } catch (final ClassCastException e) { throw (SocketException) new SocketException("Unsupported value: " + value).initCause(e); } catch (final NullPointerException e) { throw (SocketException) new SocketException("Value must not be null").initCause(e); } }
@Override public void setKeepAlive(boolean on) throws SocketException { try { chan.setOption(UnixSocketOptions.SO_KEEPALIVE, Boolean.valueOf(on)); } catch (IOException e) { throw (SocketException)new SocketException().initCause(e); } }
@Override public void setReceiveBufferSize(int size) throws SocketException { try { chan.setOption(UnixSocketOptions.SO_RCVBUF, Integer.valueOf(size)); } catch (IOException e) { throw (SocketException)new SocketException().initCause(e); } }
@Override public void setSoTimeout(int timeout) throws SocketException { try { chan.setOption(UnixSocketOptions.SO_RCVTIMEO, Integer.valueOf(timeout)); } catch (IOException e) { throw (SocketException)new SocketException().initCause(e); } }
@Override public int getReceiveBufferSize() throws SocketException { try { return chan.getOption(UnixSocketOptions.SO_RCVBUF).intValue(); } catch (IOException e) { throw (SocketException)new SocketException().initCause(e); } }
@Override public int getSoTimeout() throws SocketException { try { return chan.getOption(UnixSocketOptions.SO_RCVTIMEO).intValue(); } catch (IOException e) { throw (SocketException)new SocketException().initCause(e); } }
@Override public void setSendBufferSize(int size) throws SocketException { try { chan.setOption(UnixSocketOptions.SO_SNDBUF, Integer.valueOf(size)); } catch (IOException e) { throw (SocketException)new SocketException().initCause(e); } }
@Override public void setSendBufferSize(int size) throws SocketException { try { chan.setOption(UnixSocketOptions.SO_SNDBUF, Integer.valueOf(size)); } catch (IOException e) { throw (SocketException)new SocketException().initCause(e); } }
@Override public void setSoTimeout(int timeout) throws SocketException { try { chan.setOption(UnixSocketOptions.SO_RCVTIMEO, Integer.valueOf(timeout)); } catch (IOException e) { throw (SocketException)new SocketException().initCause(e); } }