public class MockServerListener<T extends Client> extends Object implements ServerListener<T>
ServerListener
that has a blocking queue to pass a client
to a acceptClient()
caller. If the close()
method is
called while a caller is blocked waiting to take from the queue, the
caller's thread is interrupted.public MockServerListener()
public boolean isClosed()
public void setClosed(boolean closed)
public T acceptClient() throws IOException, InterruptedException
acceptClient
in interface ServerListener<T extends Client>
IOException
InterruptedException
public void close()
close
in interface ServerListener<T extends Client>
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2005–2018 QOS.ch. All rights reserved.