Skip to content

Commit

Permalink
[java] Avoid using deprecated API
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Apr 7, 2019
1 parent 7e0e0cc commit 0d07868
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.openqa.selenium.events.EventBus;
import org.openqa.selenium.events.Type;
import org.openqa.selenium.net.NetworkUtils;
import org.zeromq.SocketType;
import org.zeromq.ZContext;
import org.zeromq.ZMQ;

Expand All @@ -44,11 +45,11 @@ class BoundZmqEventBus implements EventBus {

LOG.info(String.format("XPUB binding to %s, XSUB binding to %s", xpubAddr, xsubAddr));

xpub = context.createSocket(ZMQ.XPUB);
xpub = context.createSocket(SocketType.PUB);
xpub.setImmediate(true);
xpub.bind(xpubAddr.bindTo);

xsub = context.createSocket(ZMQ.XSUB);
xsub = context.createSocket(SocketType.XSUB);
xsub.setImmediate(true);
xsub.bind(xsubAddr.bindTo);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.openqa.selenium.events.EventBus;
import org.openqa.selenium.events.Type;
import org.openqa.selenium.json.Json;
import org.zeromq.SocketType;
import org.zeromq.ZContext;
import org.zeromq.ZMQ;

Expand Down Expand Up @@ -62,11 +63,11 @@ class UnboundZmqEventBus implements EventBus {

LOG.info(String.format("Connecting to %s and %s", publishConnection, subscribeConnection));

sub = context.createSocket(ZMQ.SUB);
sub = context.createSocket(SocketType.SUB);
sub.connect(publishConnection);
sub.subscribe(new byte[0]);

pub = context.createSocket(ZMQ.PUB);
pub = context.createSocket(SocketType.PUB);
pub.connect(subscribeConnection);

ZMQ.Poller poller = context.createPoller(1);
Expand Down

0 comments on commit 0d07868

Please sign in to comment.