2008-02-07 1.1.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.1.0

Field Summary
protected  java.util.Hashtable beginTopicListeners
          Define the begin topic listeners (Hashtable) field.
protected static long BroadcastThreshold
          Define the broadcast threshold (long) 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.
static java.lang.String NOTIFICATION_BROADCAST_THRESHOLD_DEFAULT
          Define the notification broadcast threshold default (String) constant.
static java.lang.String NOTIFICATION_BROADCAST_THRESHOLD_KEY
          Define the notification broadcast threshold key (String) constant.
static java.lang.String NOTIFICATION_NOTIFY_THRESHOLD_DEFAULT
          Define the notification notify threshold default (String) constant.
static java.lang.String NOTIFICATION_NOTIFY_THRESHOLD_KEY
          Define the notification notify threshold key (String) constant.
protected static long NotifyThreshold
          Define the notify threshold (long) 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
Capabilities, CAPABILITIES_EXTERNAL_KEY, CAPABILITIES_GET_EXTERNAL_KEY, CAPABILITIES_READ_EXTERNAL_KEY, Configuration, CONFIGURATION_DATA_KEY, CONFIGURATION_EXTERNAL_KEY, CONFIGURATION_GET_EXTERNAL_KEY, CONFIGURATION_READ_EXTERNAL_KEY, ERROR_EXTERNAL_KEY, EXCEPTION_DATA_KEY, EXECUTE_EXTERNAL_KEY, FACTORY_SERVICE_NAME, GET_EXTERNAL_KEY, MESSAGE_DATA_KEY, Metrics, METRICS_EXTERNAL_KEY, METRICS_GET_EXTERNAL_KEY, READ_EXTERNAL_KEY, SERVICE_NAME, SET_EXTERNAL_KEY, Status, STATUS_EXTERNAL_KEY, STATUS_GET_EXTERNAL_KEY, STATUS_READ_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)
           
static NotificationService createBroker()
          Create broker and return the NotificationService result.
 void exit()
          Exit.
static long getBroadcastThreshold()
          Gets the broadcast threshold (long) value.
static long getBroadcastThresholdDefault()
          Gets the broadcast threshold default (long) value.
static NotificationService getBroker()
          Gets the broker (NotificationService) value.
static java.lang.String getExternalKey(java.lang.String prefix, java.lang.String key)
           
static java.lang.String[] getExternalKeys(java.lang.String prefix, java.lang.String[] keys)
           
 NotificationQueue getInformationBroker()
          Returns the informationBroker.
static long getNotifyThreshold()
          Gets the notify threshold (long) value.
static long getNotifyThresholdDefault()
          Gets the notify threshold default (long) value.
 void notify(NotificationListener notificationListener, java.lang.String topic, java.util.Dictionary data)
          Notify with the specified notification listener, topic and data parameters.
 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.
static void setBroadcastThreshold(long broadcastThreshold)
           
static void setNotifyThreshold(long threshold)
           
 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

NOTIFICATION_NOTIFY_THRESHOLD_KEY

public static final java.lang.String NOTIFICATION_NOTIFY_THRESHOLD_KEY
Define the notification notify threshold key (String) constant.

See Also:
Constant Field Values

NOTIFICATION_NOTIFY_THRESHOLD_DEFAULT

public static final java.lang.String NOTIFICATION_NOTIFY_THRESHOLD_DEFAULT
Define the notification notify threshold default (String) constant.

See Also:
Constant Field Values

NOTIFICATION_BROADCAST_THRESHOLD_KEY

public static final java.lang.String NOTIFICATION_BROADCAST_THRESHOLD_KEY
Define the notification broadcast threshold key (String) constant. -Dnotification.broadcastthreshold=0

See Also:
Constant Field Values

NOTIFICATION_BROADCAST_THRESHOLD_DEFAULT

public static final java.lang.String NOTIFICATION_BROADCAST_THRESHOLD_DEFAULT
Define the notification broadcast threshold default (String) constant.

See Also:
Constant Field Values

Broker

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


NotifyThreshold

protected static long NotifyThreshold
Define the notify threshold (long) field.


BroadcastThreshold

protected static long BroadcastThreshold
Define the broadcast threshold (long) field.


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()

getBroadcastThreshold

public static long getBroadcastThreshold()
Gets the broadcast threshold (long) value.

Returns:
The broadcast threshold (long) value.
See Also:
setBroadcastThreshold(long)

getBroadcastThresholdDefault

public static long getBroadcastThresholdDefault()
Gets the broadcast threshold default (long) value.

Returns:
The broadcast threshold default (long) value.

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)
Parameters:
prefix - The prefix (String) parameter.
key - The key (String) parameter.
Returns:
Results of the get external key (String) value. The prefix (String) parameter. The key (String) parameter.

getExternalKeys

public static java.lang.String[] getExternalKeys(java.lang.String prefix,
                                                 java.lang.String[] keys)
Parameters:
prefix - The prefix (String) parameter.
keys - The keys (String[]) parameter.
Returns:
Results of the get external keys (String[]) value. The prefix (String) parameter. The keys (String[]) parameter.

getNotifyThreshold

public static long getNotifyThreshold()
Gets the notify threshold (long) value.

Returns:
The notify threshold (long) value.
See Also:
setNotifyThreshold(long)

getNotifyThresholdDefault

public static long getNotifyThresholdDefault()
Gets the notify threshold default (long) value.

Returns:
The notify threshold default (long) value.

setBroadcastThreshold

public static void setBroadcastThreshold(long broadcastThreshold)
Parameters:
broadcastThreshold - The broadcast threshold (long) parameter.
See Also:
getBroadcastThreshold()

setNotifyThreshold

public static void setNotifyThreshold(long threshold)
Parameters:
threshold - The threshold (long) parameter.
See Also:
getNotifyThreshold()

broadcast

public void broadcast(java.lang.String key,
                      java.util.Dictionary value)
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.

notify

public void notify(NotificationListener notificationListener,
                   java.lang.String topic,
                   java.util.Dictionary data)
Notify with the specified notification listener, topic and data parameters.

Parameters:
notificationListener - The notification listener (NotificationListener) parameter.
topic - The topic (String) parameter.
data - The data (Dictionary) parameter.

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. 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. 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. The listener (NotificationListener) parameter.

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

2008-02-07 1.1.0

Copyright (c) 1999, 2008 IBM and others. See license in Legal section. OSGi Framework Version 3.3.1.R33x_v20070828