1.0.0

org.eclipse.soda.dk.notification
Class Notification

java.lang.Object
  extended by org.eclipse.soda.dk.notification.Notification
All Implemented Interfaces:
java.lang.Runnable, NotificationService

public class Notification
extends java.lang.Object
implements NotificationService, java.lang.Runnable

Version:
1.0.0

Field Summary
protected  java.util.Hashtable beginTopicListeners
          Define the begin topic listeners (Hashtable) field.
protected static NotificationService Broker
          Define the broker (NotificationService) constant.
protected  java.util.Hashtable endTopicListeners
          Define the end topic listeners (Hashtable) field.
protected  NotificationListener globalTopicListeners
          Define the global topic listeners (NotificationListener) field.
protected  NotificationQueue queue
          Define the information broker (InformationBrokerService) field.
protected  java.lang.Thread thread
          Define the thread (Thread) field.
protected  java.util.Hashtable topicListeners
          Define the record (Hashtable) field.
 
Fields inherited from interface org.eclipse.soda.dk.notification.service.NotificationService
ERROR_EXTERNAL_KEY, EXCEPTION_DATA_KEY, EXECUTE_EXTERNAL_KEY, FACTORY_SERVICE_NAME, GET_EXTERNAL_KEY, MESSAGE_DATA_KEY, READ_EXTERNAL_KEY, SERVICE_NAME, SET_EXTERNAL_KEY, TIMESTAMP_DATA_KEY, TOPIC_DELIMITER, TOPIC_DELIMITER_STRING, TOPIC_WILDCARD, TOPIC_WILDCARD_STRING, TRIGGER_EXTERNAL_KEY, VALUE_DATA_KEY, VALUE_OLD_DATA_KEY, WRITE_EXTERNAL_KEY
 
Constructor Summary
Notification()
          Constructs an instance of this class.
 
Method Summary
 void broadcast(java.lang.String key, java.util.Dictionary value)
          Broadcast with the specified key and value parameters.
static NotificationService createBroker()
          Create broker and return the NotificationService result.
 void exit()
          Exit.
static NotificationService getBroker()
          Gets the broker (NotificationService) value.
static java.lang.String getExternalKey(java.lang.String prefix, java.lang.String key)
          Get external key with the specified prefix and key parameters and return the String result.
static java.lang.String[] getExternalKeys(java.lang.String prefix, java.lang.String[] keys)
          Get external keys with the specified prefix and keys parameters and return the String[] result.
 NotificationQueue getInformationBroker()
          Returns the informationBroker.
 void register(java.lang.String[] subscriptions, NotificationListener listener)
          Subscribe with the specified subscriptions and listener parameters.
 void register(java.lang.String subscription, NotificationListener listener)
          Subscribe with the specified subscription and listener parameters.
 void run()
          Run.
 void start()
          Start
 void stop()
          Stop.
 java.lang.String toString()
          Returns the string value.
 void unregister(NotificationListener listener)
          Unsubscribe with the specified listener parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Broker

protected static final NotificationService Broker
Define the broker (NotificationService) constant.


queue

protected NotificationQueue queue
Define the information broker (InformationBrokerService) field.


thread

protected java.lang.Thread thread
Define the thread (Thread) field.


topicListeners

protected java.util.Hashtable topicListeners
Define the record (Hashtable) field.


beginTopicListeners

protected java.util.Hashtable beginTopicListeners
Define the begin topic listeners (Hashtable) field.


endTopicListeners

protected java.util.Hashtable endTopicListeners
Define the end topic listeners (Hashtable) field.


globalTopicListeners

protected NotificationListener globalTopicListeners
Define the global topic listeners (NotificationListener) field.

Constructor Detail

Notification

public Notification()
Constructs an instance of this class.

Method Detail

createBroker

public static NotificationService createBroker()
Create broker and return the NotificationService result.

Returns:
Results of the create broker (NotificationService) value.
See Also:
getBroker(), getInformationBroker()

getBroker

public static NotificationService getBroker()
Gets the broker (NotificationService) value.

Returns:
The broker (NotificationService) value.
See Also:
createBroker(), getInformationBroker()

getExternalKey

public static java.lang.String getExternalKey(java.lang.String prefix,
                                              java.lang.String key)
Get external key with the specified prefix and key parameters and return the String result. The prefix (String) parameter. The key (String) parameter.

Parameters:
prefix - The prefix (String) parameter.
key - The key (String) parameter.
Returns:
Results of the get external key (String) value.

getExternalKeys

public static java.lang.String[] getExternalKeys(java.lang.String prefix,
                                                 java.lang.String[] keys)
Get external keys with the specified prefix and keys parameters and return the String[] result. The prefix (String) parameter. The keys (String[]) parameter.

Parameters:
prefix - The prefix (String) parameter.
keys - The keys (String[]) parameter.
Returns:
Results of the get external keys (String[]) value.

broadcast

public void broadcast(java.lang.String key,
                      java.util.Dictionary value)
Broadcast with the specified key and value parameters. The key (String) parameter. The value (Dictionary) parameter.

Specified by:
broadcast in interface NotificationService
Parameters:
key - The key (String) parameter.
value - The value (Dictionary) parameter.

exit

public void exit()
Exit.


getInformationBroker

public NotificationQueue getInformationBroker()
Returns the informationBroker.

Returns:
Results of the get information broker (NotificationQueue) value.

register

public void register(java.lang.String subscription,
                     NotificationListener listener)
Subscribe with the specified subscription and listener parameters. The subscription (String) parameter. The listener (NotificationListener) parameter. The subscription (String) parameter. The listener (NotificationListener) parameter.

Specified by:
register in interface NotificationService
Parameters:
subscription - The subscription (String) parameter.
listener - The listener (NotificationListener) parameter.
See Also:
register(String[],NotificationListener)

register

public void register(java.lang.String[] subscriptions,
                     NotificationListener listener)
Subscribe with the specified subscriptions and listener parameters. The subscriptions (String[]) parameter. The listener (NotificationListener) parameter. The subscriptions (String[]) parameter. The listener (NotificationListener) parameter.

Specified by:
register in interface NotificationService
Parameters:
subscriptions - The subscriptions (String[]) parameter.
listener - The listener (NotificationListener) parameter.
See Also:
register(String,NotificationListener)

run

public void run()
Run.

Specified by:
run in interface java.lang.Runnable

start

public void start()
Start


stop

public void stop()
Stop.


toString

public java.lang.String toString()
Returns the string value.

Overrides:
toString in class java.lang.Object
Returns:
The string (String) value.

unregister

public void unregister(NotificationListener listener)
Unsubscribe with the specified listener parameter. The listener (NotificationListener) parameter. The listener (NotificationListener) parameter.

Specified by:
unregister in interface NotificationService
Parameters:
listener - The listener (NotificationListener) parameter.

1.0.0

Copyright (c) 1999, 2007 IBM