com.sun.jini.discovery.internal
Class EndpointBasedServer.PrearrangedServerSocket

java.lang.Object
  extended by java.net.ServerSocket
      extended by 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.


Field Summary
private  boolean closed
           
private  Socket socket
           
 
Constructor Summary
EndpointBasedServer.PrearrangedServerSocket(Socket socket)
           
 
Method Summary
 Socket accept()
           
 void close()
           
 int getLocalPort()
           
 
Methods inherited from class java.net.ServerSocket
bind, bind, getChannel, getInetAddress, getLocalSocketAddress, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

socket

private Socket socket

closed

private boolean closed
Constructor Detail

EndpointBasedServer.PrearrangedServerSocket

EndpointBasedServer.PrearrangedServerSocket(Socket socket)
                                      throws IOException
Throws:
IOException
Method Detail

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.