/** * Waits for an incoming request and blocks until the connection is opened. * This method returns a socket object representing the just opened * connection. * * @return the connection representing socket. * @throws IOException * if an error occurs while accepting a new connection. */ public Socket accept() throws IOException { checkOpen(); if (!isBound()) { throw new SocketException("Socket is not bound"); } Socket aSocket = new Socket(); try { implAccept(aSocket); } catch (IOException e) { aSocket.close(); throw e; } return aSocket; }
public Socket implAccept(SocketChannelImpl clientSocketChannel) throws IOException { Socket clientSocket = clientSocketChannel.socket(); boolean connectOK = false; try { synchronized (this) { super.implAccept(clientSocket); clientSocketChannel.setConnected(); clientSocketChannel.setBound(true); clientSocketChannel.finishAccept(); } connectOK = true; } finally { if (!connectOK) { clientSocket.close(); } } return clientSocket; }
"Monitor Ctrl-Break" daemon prio=6 tid=0x0000000006b98000 nid=0x1d70 runnable [0x00000000074df000] java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:408) - locked <0x00000007d5d53148> (a java.net.SocksSocketImpl) at java.net.ServerSocket.implAccept(ServerSocket.java:462) at java.net.ServerSocket.accept(ServerSocket.java:430) at com.intellij.rt.execution.application.AppMain$1.run(AppMain.java:82) at java.lang.Thread.run(Thread.java:662) Locked ownable synchronizers: - None ...
@Override public Socket accept() throws IOException { Socket s = new NoLocalAddressSocket(); super.implAccept(s); return s; } }
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:408) - locked <7b20d3f08> (a java.net.SocksSocketImpl) at java.net.ServerSocket.implAccept(ServerSocket.java:462) at java.net.ServerSocket.accept(ServerSocket.java:430) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
public class AuditableClientServerSocket extends ServerSocket { // Constructors removed for brevity. Add them back here @Override public Socket accept() throws IOException { if (isClosed()) throw new SocketException("Socket is closed"); if (!isBound()) throw new SocketException("Socket is not bound yet"); final Socket s = new AuditableClientSocket((SocketImpl) null); implAccept(s); return s; } }
public class ServerClientSocket extends ServerSocket { public ClientSocket accept() throws IOException { if (isClosed()) throw new SocketException("Socket is closed"); if (!isBound()) throw new SocketException("Socket is not bound yet"); ClientSocket s = new ClientSocket((SocketImpl) null); implAccept(s); return s; } }
/** * Waits for an incoming request and blocks until the connection is opened. * This method returns a socket object representing the just opened * connection. * * @return the connection representing socket. * @throws IOException * if an error occurs while accepting a new connection. */ public Socket accept() throws IOException { checkOpen(); if (!isBound()) { throw new SocketException("Socket is not bound"); } Socket aSocket = new Socket(); try { implAccept(aSocket); } catch (IOException e) { aSocket.close(); throw e; } return aSocket; }
/** * Waits for an incoming request and blocks until the connection is opened. * This method returns a socket object representing the just opened * connection. * * @return the connection representing socket. * @throws IOException * if an error occurs while accepting a new connection. */ public Socket accept() throws IOException { checkOpen(); if (!isBound()) { throw new SocketException("Socket is not bound"); } Socket aSocket = new Socket(); try { implAccept(aSocket); } catch (IOException e) { aSocket.close(); throw e; } return aSocket; }
/** * Waits for an incoming request and blocks until the connection is opened. * This method returns a socket object representing the just opened * connection. * * @return the connection representing socket. * @throws IOException * if an error occurs while accepting a new connection. */ public Socket accept() throws IOException { checkOpen(); if (!isBound()) { throw new SocketException("Socket is not bound"); } Socket aSocket = new Socket(); try { implAccept(aSocket); } catch (IOException e) { aSocket.close(); throw e; } return aSocket; }
/** * Waits for an incoming request and blocks until the connection is opened. * This method returns a socket object representing the just opened * connection. * * @return the connection representing socket. * @throws IOException * if an error occurs while accepting a new connection. */ public Socket accept() throws IOException { checkOpen(); if (!isBound()) { throw new SocketException("Socket is not bound"); } Socket aSocket = new Socket(); try { implAccept(aSocket); } catch (IOException e) { aSocket.close(); throw e; } return aSocket; }
/** * Waits for an incoming request and blocks until the connection is opened. * This method returns a socket object representing the just opened * connection. * * @return the connection representing socket. * @throws IOException * if an error occurs while accepting a new connection. */ public Socket accept() throws IOException { checkOpen(); if (!isBound()) { throw new SocketException("Socket is not bound"); } Socket aSocket = new Socket(); try { implAccept(aSocket); } catch (IOException e) { aSocket.close(); throw e; } return aSocket; }
/** * Waits for an incoming request and blocks until the connection is opened. * This method returns a socket object representing the just opened * connection. * * @return the connection representing socket. * @throws IOException * if an error occurs while accepting a new connection. */ public Socket accept() throws IOException { checkOpen(); if (!isBound()) { throw new SocketException("Socket is not bound"); } Socket aSocket = new Socket(); try { implAccept(aSocket); } catch (IOException e) { aSocket.close(); throw e; } return aSocket; }
public Socket implAccept(SocketChannelImpl clientSocketChannel) throws IOException { Socket clientSocket = clientSocketChannel.socket(); boolean connectOK = false; try { synchronized (this) { super.implAccept(clientSocket); clientSocketChannel.setConnected(); clientSocketChannel.setBound(true); clientSocketChannel.finishAccept(); } connectOK = true; } finally { if (!connectOK) { clientSocket.close(); } } return clientSocket; }
public Socket implAccept(SocketChannelImpl clientSocketChannel) throws IOException { Socket clientSocket = clientSocketChannel.socket(); boolean connectOK = false; try { synchronized (this) { super.implAccept(clientSocket); clientSocketChannel.setConnected(); clientSocketChannel.setBound(true); clientSocketChannel.finishAccept(); } connectOK = true; } finally { if (!connectOK) { clientSocket.close(); } } return clientSocket; }
public Socket implAccept(SocketChannelImpl clientSocketChannel) throws IOException { Socket clientSocket = clientSocketChannel.socket(); boolean connectOK = false; try { synchronized (this) { super.implAccept(clientSocket); clientSocketChannel.setConnected(); clientSocketChannel.setBound(true); clientSocketChannel.finishAccept(); } connectOK = true; } finally { if (!connectOK) { clientSocket.close(); } } return clientSocket; }
public Socket implAccept(SocketChannelImpl clientSocketChannel) throws IOException { Socket clientSocket = clientSocketChannel.socket(); boolean connectOK = false; try { synchronized (this) { super.implAccept(clientSocket); clientSocketChannel.setConnected(); clientSocketChannel.setBound(true); clientSocketChannel.finishAccept(); } connectOK = true; } finally { if (!connectOK) { clientSocket.close(); } } return clientSocket; }
public Socket implAccept(SocketChannelImpl clientSocketChannel) throws IOException { Socket clientSocket = clientSocketChannel.socket(); boolean connectOK = false; try { synchronized (this) { super.implAccept(clientSocket); clientSocketChannel.setConnected(); clientSocketChannel.setBound(true); clientSocketChannel.finishAccept(); } connectOK = true; } finally { if (!connectOK) { clientSocket.close(); } } return clientSocket; }
public Socket implAccept(SocketChannelImpl clientSocketChannel) throws IOException { Socket clientSocket = clientSocketChannel.socket(); boolean connectOK = false; try { synchronized (this) { super.implAccept(clientSocket); clientSocketChannel.setConnected(); clientSocketChannel.setBound(true); clientSocketChannel.finishAccept(); } connectOK = true; } finally { if (!connectOK) { clientSocket.close(); } } return clientSocket; }
implAccept(s); return s;