All Packages Class Hierarchy This Package Previous Next Index
Class weblab.net.SubscriberImp
java.lang.Object
|
+----java.rmi.server.RemoteObject
|
+----java.rmi.server.RemoteServer
|
+----java.rmi.server.UnicastRemoteObject
|
+----weblab.net.SubscriberImp
- public class SubscriberImp
- extends UnicastRemoteObject
- implements SubscriberInt
SubscriberImp is the Implementation of SubscriberInt.
It subscribes to Subjects and handles Subject's callbacks via update().
- See Also:
- Subject, Publisher
-
SubscriberImp(String, String, Subscriber)
- Constructor.
-
name()
- Return Subscriber's name.
-
subscribe(String)
- Subscribe to a Subject to a WhiteBoard.
-
update(Subject)
- Update Subscriber's knowledge of a Subject.
SubscriberImp
public SubscriberImp(String name,
String wb_host,
Subscriber user) throws RemoteException
- Constructor.
- Parameters:
- name - the Subscriber's name.
- wb_host - the WhiteBoard's host name. For example, "ottawa".
subscribe
public Object subscribe(String subj_name)
- Subscribe to a Subject to a WhiteBoard. Return true if successful.
- Parameters:
- subj_name - Subject's name.
name
public String name() throws RemoteException
- Return Subscriber's name.
update
public void update(Subject s) throws RemoteException
- Update Subscriber's knowledge of a Subject.
- Parameters:
- s - The Subject.
All Packages Class Hierarchy This Package Previous Next Index