|Constructor and Description|
Constructs a new listener.
|Modifier and Type||Method and Description|
Accepts the next client that appears on this listener.
Closes any underlying
public ServerSocketListener(java.net.ServerSocket serverSocket)
serverSocket- server socket delegate
public T acceptClient() throws java.io.IOException
An implementation of this method is expected to block the calling thread and not return until either a client appears or an exception occurs.
public void close()
Closeableresources associated with this listener.
Note that (as described in Doug Lea's discussion about interrupting I/O
operations in "Concurrent Programming in Java" (Addison-Wesley
Professional, 2nd edition, 1999) this method is used to interrupt
any blocked I/O operation in the client when the server is shutting
down. The client implementation must anticipate this potential,
and gracefully exit when the blocked I/O operation throws the
Note also, that unlike
Closeable.close() this method is not
permitted to propagate any
IOException that occurs when closing
the underlying resource(s).
public java.lang.String toString()
Copyright © 2010 - 2020 Adobe. All Rights Reserved