Voyager ORB

com.objectspace.voyager.space.publishing
Interface ISubscriber

All Known Implementing Classes:
Subscriber

public abstract interface ISubscriber
extends PublishedEventListener

ISubscriber is the interface implemented by Subscriber.

Version:
3.0
See Also:
com.objectspace.voyager.space.Subscriber.

Method Summary
 void clear()
          Clear my list of subscriptions.
 PublishedEventListener getListener()
          Return my associated PublishedEventListener.
 Topic[] getTopics()
          Return an array of all the topics I subscribe to.
 boolean isSubscriber(Topic topic)
          Return true if I subscribe to the specified topic.
 void publishedEvent(java.util.EventObject event, Topic topic)
          If the event matches at least one of my subscriptions, forward it to my associated PublishedEventListener, otherwise ignore it.
 void setListener(PublishedEventListener listener)
          Forward all events that match at least one of my subscriptions to the specified listener.
 void subscribe(Topic topic)
          Add the specified topic to my list of subscriptions.
 void unsubscribe(Topic topic)
          Remove the specified topic from my list of subscriptions.
 

Method Detail

subscribe

public void subscribe(Topic topic)
Add the specified topic to my list of subscriptions.
Parameters:
topic - The topic to add.

unsubscribe

public void unsubscribe(Topic topic)
Remove the specified topic from my list of subscriptions.
Parameters:
topic - The topic to remove.

isSubscriber

public boolean isSubscriber(Topic topic)
Return true if I subscribe to the specified topic.
Parameters:
topic - The topic to find.

clear

public void clear()
Clear my list of subscriptions.

getTopics

public Topic[] getTopics()
Return an array of all the topics I subscribe to.

setListener

public void setListener(PublishedEventListener listener)
Forward all events that match at least one of my subscriptions to the specified listener.
Parameters:
listener - The PublishedEventListener that I will forward all matching events.

getListener

public PublishedEventListener getListener()
Return my associated PublishedEventListener.

publishedEvent

public void publishedEvent(java.util.EventObject event,
                           Topic topic)
If the event matches at least one of my subscriptions, forward it to my associated PublishedEventListener, otherwise ignore it.
Specified by:
publishedEvent in interface PublishedEventListener
Parameters:
event - The event
topic - The topic associated with the event.

ObjectSpace Inc.

(c) Copyright 1997-1999 ObjectSpace, Inc.
14850 Quorum Drive, Suite 500
Dallas, Texas 75240