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

Constructor Index

 o SubscriberImp(String, String, Subscriber)
Constructor.

Method Index

 o name()
Return Subscriber's name.
 o subscribe(String)
Subscribe to a Subject to a WhiteBoard.
 o update(Subject)
Update Subscriber's knowledge of a Subject.

Constructors

 o 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".

Methods

 o subscribe
 public Object subscribe(String subj_name)
Subscribe to a Subject to a WhiteBoard. Return true if successful.

Parameters:
subj_name - Subject's name.
 o name
 public String name() throws RemoteException
Return Subscriber's name.

 o 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