com.sun.jini.discovery.internal
Class EndpointBasedServer.PrearrangedServerSocket
java.lang.Object
java.net.ServerSocket
com.sun.jini.discovery.internal.EndpointBasedServer.PrearrangedServerSocket
- Enclosing class:
- EndpointBasedServer
private static class EndpointBasedServer.PrearrangedServerSocket
- extends ServerSocket
Server socket that returns a prearranged socket once from its accept
method, and then blocks on subsequent calls to accept until closed.
Methods inherited from class java.net.ServerSocket |
bind, bind, getChannel, getInetAddress, getLocalSocketAddress, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, toString |
socket
private Socket socket
closed
private boolean closed
EndpointBasedServer.PrearrangedServerSocket
EndpointBasedServer.PrearrangedServerSocket(Socket socket)
throws IOException
- Throws:
IOException
accept
public Socket accept()
throws IOException
- Overrides:
accept
in class ServerSocket
- Throws:
IOException
getLocalPort
public int getLocalPort()
- Overrides:
getLocalPort
in class ServerSocket
close
public void close()
throws IOException
- Overrides:
close
in class ServerSocket
- Throws:
IOException
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.