akka.zeromq
Class Subscribe

java.lang.Object
  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.

See Also:
Serialized Form

Constructor Summary
Subscribe(scala.collection.Seq<java.lang.Object> payload)
           
Subscribe(java.lang.String topic)
           
 
Method Summary
static Subscribe all()
           
static Subscribe apply(java.lang.String topic)
           
 scala.collection.Seq<java.lang.Object> 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

Subscribe

public Subscribe(scala.collection.Seq<java.lang.Object> payload)

Subscribe

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

apply

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

all

public static Subscribe all()

payload

public scala.collection.Seq<java.lang.Object> payload()
Specified by:
payload in interface PubSubOption