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
-
getValue()
- Return current value of this Subject.
-
name()
- Return name of this Subject.
-
setValue(Object)
- Publish data to this Subject.
-
subscribe(String)
-
-
subscribe(SubscriberInt)
- Subscribe to this Subject.
-
unsubscribe(String)
- Unsubscribe to this Subject.
name
public abstract String name() throws RemoteException
- Return name of this Subject.
getValue
public abstract Object getValue() throws RemoteException
- Return current value of this Subject.
subscribe
public abstract Object subscribe(SubscriberInt s) throws RemoteException
- Subscribe to this Subject. Returns the current Subject value.
- Parameters:
- s - the Subscriber object
subscribe
public abstract Object subscribe(String s) throws RemoteException
unsubscribe
public abstract boolean unsubscribe(String sn) throws RemoteException
- Unsubscribe to this Subject. Return true if successful.
- Parameters:
- sn - the Subscriber's name
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