Class Subscribe

  extended by akka.zeromq.Subscribe
All Implemented Interfaces:
PubSubOption, Request, SocketOption, java.io.Serializable, scala.Equals, scala.Product

public class Subscribe
extends java.lang.Object
implements PubSubOption, scala.Product, scala.Serializable

The Subscribe option establishes a new message filter on a akka.zeromq.SocketType.Pub socket. Newly created akka.zeromq.SocketType.Sub sockets filter out all incoming messages, therefore you should send this option to establish an initial message filter.

An empty payload of length zero will subscribe to all incoming messages. A non-empty payload will subscribe to all messages beginning with the specified prefix. Multiple filters may be attached to a single akka.zeromq.SocketType.Sub socket, in which case a message will be accepted if it matches at least one filter.

param: payload the topic to subscribe to

See Also:
Serialized Form

Constructor Summary
Subscribe(ByteString payload)
Subscribe(java.lang.String topic)
Method Summary
static Subscribe all()
static Subscribe apply(java.lang.String topic)
 ByteString payload()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface scala.Product
productArity, productElement, productIterator, productPrefix
Methods inherited from interface scala.Equals
canEqual, equals

Constructor Detail


public Subscribe(ByteString payload)


public Subscribe(java.lang.String topic)
Method Detail


public static Subscribe all()


public static Subscribe apply(java.lang.String topic)


public ByteString payload()
Specified by:
payload in interface PubSubOption