Figure 15 shows a first example of content-based publish/subscribe. We suppose here that Bob is only interested in what a particular participant, Alice, publishes on topic /Chat/Insomnia. Bob defines a corresponding condition. The null argument in the condition initialization denotes a set of empty argument lists. A subscription is viewed as an interest in future elements, and is expressed by a call to the contains() method.
... /* connect */ DASet myChat = new DAStrongSet("/Chat/Insomnia"); /* create condition */ Condition onlyAlice = new Equals("/getSender", null, "Alice"); /* create callback object and subscribe */ Notifiable n = new ChatNotifiable(); myChat.contains(n, onlyAlice); ...