Class sunsoft.jws.visual.rt.base.Registry
All Packages Class Hierarchy This Package Previous Next Index
Class sunsoft.jws.visual.rt.base.Registry
java.lang.Object
|
+----sunsoft.jws.visual.rt.base.Registry
- public class Registry
- extends Object
- implements Runnable
The event registry
-
Registry()
- Constructor.
-
getPublishers()
- Get the list of registered publishers.
-
publish(Message)
- Send an event via the registry to all subscribers.
-
register(String, String, Object)
- Register a publisher with the registry.
-
run()
- The actual run method
-
subscribe(Message, AttributeManager)
- Subscribe to events using the supplied Message as a template for
requested events.
-
unregister(String)
- Unregister a publisher.
-
unsubscribe(int)
- Cancel a subscription.
Registry
public Registry()
- Constructor.
subscribe
public synchronized int subscribe(Message msg,
AttributeManager obj)
- Subscribe to events using the supplied Message as a template for
requested events.
Only 'name', 'type' and 'targetName' can be set on the template event.
(all other fields should be null, zero or false as appropriate).
The strings are compared for equality. If the last character of the
string is '*', then all strings beginning with the rest of the string
are considered to be matching.
Note: the callback object should be written to handle callbacks
on multiple threads.
unsubscribe
public synchronized void unsubscribe(int id)
- Cancel a subscription. The 'id' is the value returned from the
subscribe call.
publish
public synchronized void publish(Message msg)
- Send an event via the registry to all subscribers.
run
public void run()
- The actual run method
register
public synchronized void register(String publisher_name,
String description,
Object obj)
- Register a publisher with the registry. This is not necessary in order
to actually publish. It is just used to advertise yourself in the
publishers list.
unregister
public synchronized void unregister(String publisher_name)
- Unregister a publisher.
getPublishers
public synchronized RegistryEntry[] getPublishers()
- Get the list of registered publishers.
All Packages Class Hierarchy This Package Previous Next Index