Refine search
static void throwConnectException(String method, NativeConnectException refusedCause, int err) throws IOException { if (err == refusedCause.expectedErr()) { throw refusedCause; } if (err == ERROR_EALREADY_NEGATIVE) { throw new ConnectionPendingException(); } if (err == ERROR_ENETUNREACH_NEGATIVE) { throw new NoRouteToHostException(); } if (err == ERROR_EISCONN_NEGATIVE) { throw new AlreadyConnectedException(); } if (err == ERRNO_ENOENT_NEGATIVE) { throw new FileNotFoundException(); } throw new ConnectException(method + "(..) failed: " + ERRORS[-err]); }
@Override public void bind(SocketAddress localAddr) throws IOException { if (channel.isConnected()) { throw new AlreadyConnectedException(); } if (SocketChannelImpl.SOCKET_STATUS_PENDING == channel.status) { throw new ConnectionPendingException(); } super.bind(localAddr); channel.initLocalAddressAndPort(); channel.isBound = true; }
/** * @see java.net.DatagramSocket#bind(java.net.SocketAddress) */ @Override public void bind(SocketAddress localAddr) throws SocketException { if (channelImpl.isConnected()) { throw new AlreadyConnectedException(); } super.bind(localAddr); channelImpl.isBound = true; }
synchronized private void checkUnconnected() throws IOException { if (!isOpen()) { throw new ClosedChannelException(); } if (status == SOCKET_STATUS_CONNECTED) { throw new AlreadyConnectedException(); } if (status == SOCKET_STATUS_PENDING) { throw new ConnectionPendingException(); } }
@Override public void connect(SocketAddress remoteAddr, int timeout) throws IOException { if (!channel.isBlocking()) { throw new IllegalBlockingModeException(); } if (isConnected()) { throw new AlreadyConnectedException(); } super.connect(remoteAddr, timeout); channel.initLocalAddressAndPort(); if (super.isConnected()) { channel.setConnected(); channel.isBound = super.isBound(); } }
static void throwConnectException(String method, NativeConnectException refusedCause, int err) throws IOException { if (err == refusedCause.expectedErr()) { throw refusedCause; } if (err == ERROR_EALREADY_NEGATIVE) { throw new ConnectionPendingException(); } if (err == ERROR_ENETUNREACH_NEGATIVE) { throw new NoRouteToHostException(); } if (err == ERROR_EISCONN_NEGATIVE) { throw new AlreadyConnectedException(); } if (err == ERRNO_ENOENT_NEGATIVE) { throw new FileNotFoundException(); } throw new ConnectException(method + "(..) failed: " + ERRORS[-err]); }
synchronized private void checkUnconnected() throws IOException { if (!isOpen()) { throw new ClosedChannelException(); } if (status == SOCKET_STATUS_CONNECTED) { throw new AlreadyConnectedException(); } if (status == SOCKET_STATUS_PENDING) { throw new ConnectionPendingException(); } }
throw new AlreadyConnectedException();
Exception cause = new AlreadyConnectedException(); safeSetFailure(promise, cause); pipeline().fireExceptionCaught(cause); throw new ConnectionPendingException(); Exception cause = new ConnectException("connection refused: " + remoteAddress); safeSetFailure(promise, cause); close(voidPromise());
@Override public void bind(SocketAddress localAddr) throws IOException { if (channel.isConnected()) { throw new AlreadyConnectedException(); } if (SocketChannelImpl.SOCKET_STATUS_PENDING == channel.status) { throw new ConnectionPendingException(); } super.bind(localAddr); channel.initLocalAddressAndPort(); channel.isBound = true; }
throw new AlreadyConnectedException();
Exception cause = new AlreadyConnectedException(); safeSetFailure(promise, cause); pipeline().fireExceptionCaught(cause); throw new ConnectionPendingException(); Exception cause = new ConnectException("connection refused: " + remoteAddress); safeSetFailure(promise, cause); close(voidPromise());
synchronized private void checkUnconnected() throws IOException { if (!isOpen()) { throw new ClosedChannelException(); } if (status == SOCKET_STATUS_CONNECTED) { throw new AlreadyConnectedException(); } if (status == SOCKET_STATUS_PENDING) { throw new ConnectionPendingException(); } }
throw new AlreadyConnectedException();
Exception cause = new AlreadyConnectedException(); safeSetFailure(promise, cause); pipeline().fireExceptionCaught(cause); throw new ConnectionPendingException(); Exception cause = new ConnectException("connection refused: " + remoteAddress); safeSetFailure(promise, cause); close(voidPromise());
@Override public void bind(SocketAddress localAddr) throws IOException { if (channel.isConnected()) { throw new AlreadyConnectedException(); } if (SocketChannelImpl.SOCKET_STATUS_PENDING == channel.status) { throw new ConnectionPendingException(); } super.bind(localAddr); channel.initLocalAddressAndPort(); channel.isBound = true; }
throw new AlreadyConnectedException();
static void throwConnectException(String method, NativeConnectException refusedCause, int err) throws IOException { if (err == refusedCause.expectedErr()) { throw refusedCause; } if (err == ERROR_EALREADY_NEGATIVE) { throw new ConnectionPendingException(); } if (err == ERROR_ENETUNREACH_NEGATIVE) { throw new NoRouteToHostException(); } if (err == ERROR_EISCONN_NEGATIVE) { throw new AlreadyConnectedException(); } throw new ConnectException(method + "(..) failed: " + ERRORS[-err]); }
synchronized private void checkUnconnected() throws IOException { if (!isOpen()) { throw new ClosedChannelException(); } if (status == SOCKET_STATUS_CONNECTED) { throw new AlreadyConnectedException(); } if (status == SOCKET_STATUS_PENDING) { throw new ConnectionPendingException(); } }
/** * @see java.net.DatagramSocket#bind(java.net.SocketAddress) */ @Override public void bind(SocketAddress localAddr) throws SocketException { if (channelImpl.isConnected()) { throw new AlreadyConnectedException(); } super.bind(localAddr); channelImpl.isBound = true; }