Package zmq

Class ZMQ


public class ZMQ extends Object
  • Field Details

  • Constructor Details

    • ZMQ

      public ZMQ()
  • Method Details

    • createContext

      public static Ctx createContext()
    • checkContext

      private static void checkContext(Ctx ctx)
    • destroyContext

      private static void destroyContext(Ctx ctx)
    • setContextOption

      public static void setContextOption(Ctx ctx, int option, int optval)
    • getContextOption

      public static int getContextOption(Ctx ctx, int option)
    • init

      public static Ctx init(int ioThreads)
    • term

      public static void term(Ctx ctx)
    • socket

      public static SocketBase socket(Ctx ctx, int type)
    • checkSocket

      private static void checkSocket(SocketBase s)
    • closeZeroLinger

      public static void closeZeroLinger(SocketBase s)
    • close

      public static void close(SocketBase s)
    • setSocketOption

      public static boolean setSocketOption(SocketBase s, int option, Object optval)
    • getSocketOptionExt

      public static Object getSocketOptionExt(SocketBase s, int option)
    • getSocketOption

      public static int getSocketOption(SocketBase s, int opt)
    • monitorSocket

      public static boolean monitorSocket(SocketBase s, String addr, int events)
    • bind

      public static boolean bind(SocketBase s, String addr)
    • connect

      public static boolean connect(SocketBase s, String addr)
    • connectPeer

      public static int connectPeer(SocketBase s, String addr)
    • disconnectPeer

      public static boolean disconnectPeer(SocketBase s, int routingId)
    • unbind

      public static boolean unbind(SocketBase s, String addr)
    • disconnect

      public static boolean disconnect(SocketBase s, String addr)
    • send

      public static int send(SocketBase s, String str, int flags)
    • send

      public static int send(SocketBase s, Msg msg, int flags)
    • send

      public static int send(SocketBase s, byte[] buf, int flags)
    • send

      public static int send(SocketBase s, byte[] buf, int len, int flags)
    • sendiov

      public int sendiov(SocketBase s, byte[][] a, int count, int flags)
    • sendMsg

      public static boolean sendMsg(SocketBase socket, byte[]... data)
    • sendMsg

      public static int sendMsg(SocketBase s, Msg msg, int flags)
    • recv

      public static Msg recv(SocketBase s, int flags)
    • recviov

      public int recviov(SocketBase s, byte[][] a, int count, int flags)
    • recvMsg

      public static Msg recvMsg(SocketBase s, int flags)
    • join

      public static boolean join(SocketBase s, String group)
    • leave

      public static boolean leave(SocketBase s, String group)
    • msgInit

      public static Msg msgInit()
    • msgInitWithSize

      public static Msg msgInitWithSize(int messageSize)
    • msgSize

      public static int msgSize(Msg msg)
    • getMessageOption

      public static int getMessageOption(Msg msg, int option)
    • getMessageMetadata

      public static String getMessageMetadata(Msg msg, String property)
    • setMessageRoutingId

      public boolean setMessageRoutingId(Msg msg, int routingId)
    • getMessageRoutingId

      public int getMessageRoutingId(Msg msg)
    • setMessageGroup

      public boolean setMessageGroup(Msg msg, String group)
    • getMessageGroup

      public String getMessageGroup(Msg msg)
    • sleep

      public static void sleep(long seconds)
    • msleep

      public static void msleep(long milliseconds)
    • sleep

      public static void sleep(long amount, TimeUnit unit)
    • poll

      public static int poll(Selector selector, PollItem[] items, long timeout)
      Polling on items with given selector CAUTION: This could be affected by jdk epoll bug
      Parameters:
      selector - Open and reuse this selector and do not forget to close when it is not used.
      items -
      timeout -
      Returns:
      number of events
    • poll

      public static int poll(Selector selector, PollItem[] items, int count, long timeout)
      Polling on items with given selector CAUTION: This could be affected by jdk epoll bug
      Parameters:
      selector - Open and reuse this selector and do not forget to close when it is not used.
      items -
      count -
      timeout -
      Returns:
      number of events
    • proxy

      public static boolean proxy(SocketBase frontend, SocketBase backend, SocketBase capture)
    • proxy

      public static boolean proxy(SocketBase frontend, SocketBase backend, SocketBase capture, SocketBase control)
    • device

      public static boolean device(int device, SocketBase frontend, SocketBase backend)
    • startStopwatch

      public static long startStopwatch()
    • stopStopwatch

      public static long stopStopwatch(long watch)
    • makeVersion

      public static int makeVersion(int major, int minor, int patch)
    • strerror

      public static String strerror(int errno)