Search in sources :

Example 1 with DefaultSelectorProviderChooser

use of org.zeromq.SelectorProviderTest.DefaultSelectorProviderChooser in project jeromq by zeromq.

the class OptionsTest method testSelectorObject.

@Test(timeout = 5000)
public void testSelectorObject() {
    try (ZContext ctx = new ZContext();
        Socket socket = ctx.createSocket(SocketType.PUB)) {
        SelectorProviderChooser chooser = new DefaultSelectorProviderChooser();
        socket.setSelectorChooser(chooser);
        Assert.assertEquals(chooser, socket.getSelectorProviderChooser());
    }
}
Also used : DefaultSelectorProviderChooser(org.zeromq.SelectorProviderTest.DefaultSelectorProviderChooser) ZContext(org.zeromq.ZContext) SelectorProviderChooser(zmq.io.net.SelectorProviderChooser) DefaultSelectorProviderChooser(org.zeromq.SelectorProviderTest.DefaultSelectorProviderChooser) Socket(org.zeromq.ZMQ.Socket) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 DefaultSelectorProviderChooser (org.zeromq.SelectorProviderTest.DefaultSelectorProviderChooser)1 ZContext (org.zeromq.ZContext)1 Socket (org.zeromq.ZMQ.Socket)1 SelectorProviderChooser (zmq.io.net.SelectorProviderChooser)1