All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface weblab.net.Subject

public interface Subject
extends Remote
Subject is the interface to SubjectImp, a data container class. It maintains a list of subscribers and notifies them when its value is updated.

See Also:
SubjectImp

Method Index

 o getValue()
Return current value of this Subject.
 o name()
Return name of this Subject.
 o setValue(Object)
Publish data to this Subject.
 o subscribe(String)
 o subscribe(SubscriberInt)
Subscribe to this Subject.
 o unsubscribe(String)
Unsubscribe to this Subject.

Methods

 o name
 public abstract String name() throws RemoteException
Return name of this Subject.

 o getValue
 public abstract Object getValue() throws RemoteException
Return current value of this Subject.

 o subscribe
 public abstract Object subscribe(SubscriberInt s) throws RemoteException
Subscribe to this Subject. Returns the current Subject value.

Parameters:
s - the Subscriber object
 o subscribe
 public abstract Object subscribe(String s) throws RemoteException
 o unsubscribe
 public abstract boolean unsubscribe(String sn) throws RemoteException
Unsubscribe to this Subject. Return true if successful.

Parameters:
sn - the Subscriber's name
 o setValue
 public abstract boolean setValue(Object value) throws RemoteException
Publish data to this Subject. Return true if successful.

Parameters:
value - the Object to publish.

All Packages  Class Hierarchy  This Package  Previous  Next  Index