public class MockServerListener<T extends ch.qos.logback.core.net.server.Client> extends Object implements ch.qos.logback.core.net.server.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 Thread getWaiter()
public void setWaiter(Thread waiter)
public boolean isClosed()
public void setClosed(boolean closed)
public T acceptClient() throws IOException, InterruptedException
acceptClient in interface ch.qos.logback.core.net.server.ServerListener<T extends ch.qos.logback.core.net.server.Client>IOExceptionInterruptedExceptionpublic void addClient(T client)
public void close()
close in interface ch.qos.logback.core.net.server.ServerListener<T extends ch.qos.logback.core.net.server.Client>close in interface Closeableclose in interface AutoCloseableCopyright © 2005–2016 QOS.ch. All rights reserved.