KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmock > examples > website > Publisher


1 /* Copyright (c) 2000-2004 jMock.org
2  */

3 package org.jmock.examples.website;
4
5
6 public class Publisher
7 {
8     private Subscriber subscriber;
9
10     public void add( Subscriber newSubscriber ) {
11         this.subscriber = newSubscriber;
12     }
13
14     public void publish( Message message ) {
15         subscriber.receive(message);
16     }
17 }
18
Popular Tags