2008-07-29 1.1.0

org.eclipse.soda.dk.notification
Class Notification

java.lang.Object
  extended by org.eclipse.soda.dk.core.EscObject
      extended by org.eclipse.soda.dk.core.ConfigurableObject
          extended by org.eclipse.soda.dk.notification.NotificationResourceBase
              extended by org.eclipse.soda.dk.notification.NotificationBase
                  extended by org.eclipse.soda.dk.notification.Notification
All Implemented Interfaces:
java.lang.Runnable, ConfigurableService, NotificationExtendableService, NotificationService

public class Notification
extends org.eclipse.soda.dk.notification.NotificationBase
implements NotificationExtendableService, java.lang.Runnable

Version:
1.1.0

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.soda.dk.notification.NotificationResourceBase
org.eclipse.soda.dk.notification.NotificationResourceBase.ConfigurationInformationProxy
 
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 class org.eclipse.soda.dk.notification.NotificationBase
broadcastCount, broadcastThreshold, broadcastThresholdCount, BroadcastThresholdDefault, level, levelMaximum, levelMinimum, notificationExtension, NotificationHost, NotificationId, notificationMonitor, notifyCount, notifyThreshold, notifyThresholdCount, NotifyThresholdDefault, prefixStatus
 
Fields inherited from class org.eclipse.soda.dk.notification.NotificationResourceBase
DefaultResourceBundle, NOTIFICATION_BROADCAST_EXCEEDED_RESOURCE, NOTIFICATION_BROADCAST_THRESHOLD_DEFAULT, NOTIFICATION_BROADCAST_THRESHOLD_KEY, NOTIFICATION_NOTIFY_EXCEEDED_RESOURCE, NOTIFICATION_NOTIFY_THRESHOLD_DEFAULT, NOTIFICATION_NOTIFY_THRESHOLD_KEY, NOTIFICATION_START_RESOURCE, NOTIFICATION_STOP_RESOURCE
 
Fields inherited from class org.eclipse.soda.dk.core.ConfigurableObject
BUNDLE_VERSION_PROPERTY
 
Fields inherited from class org.eclipse.soda.dk.core.EscObject
CLONE_EXCEPTION_RESOURCE, EMPTY_BYTES, EMPTY_STRING, ERROR_OCCURRED_EXCEPTION_RESOURCE, ID_FILTER_KEY, ID_KEY, ID_KEY_ANY, ID_NAME_KEY, INTEGER_TABLE, INTEGER_TABLE_SIZE, KEY_KEY, LOG_DEBUG, LOG_DEFAULT, LOG_ERROR, LOG_INFO, LOG_LEVEL_KEY, LOG_TRACE, LOG_WARNING, LONG_TABLE, LONG_TABLE_SIZE, PREFIX_KEY, READONLY_EMPTY_COLLECTION, READONLY_EMPTY_LIST, READONLY_EMPTY_MAP, RESOURCE_BUNDLE, SLEEP_EXCEPTION_RESOURCE, SYSTEM_INFO_RESOURCE, TO_STRING_CONFIGURATION_KEYS, TRACE_LEVEL_HIGH, TRACE_LEVEL_LOW, TRACE_LEVEL_MAX, TRACE_LEVEL_MIN, TRACE_LEVEL_NONE, TRACE_LEVEL_NORMAL, TRACELEVEL_KEY, UNKNOWN_ERROR_RESOURCE
 
Fields inherited from interface org.eclipse.soda.dk.notification.service.NotificationExtendableService
SERVICE_NAME
 
Fields inherited from interface org.eclipse.soda.dk.notification.service.NotificationService
BROADCAST_THRESHOLD_KEY, BUNDLE_DATA_KEY, 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, EVENT_DATA_KEY, EXCEPTION_DATA_KEY, EXECUTE_EXTERNAL_KEY, FACTORY_SERVICE_NAME, GET_EXTERNAL_KEY, ID_DATA_KEY, LEVEL_DATA_KEY, LEVEL_DEFAULT, LEVEL_EXTENSION, LEVEL_KEY, LEVEL_MAXIMUM, LEVEL_MAXIMUM_KEY, LEVEL_MINIMUM, LEVEL_MINIMUM_KEY, LEVEL_MONITOR, MESSAGE_DATA_KEY, Metrics, METRICS_EXTERNAL_KEY, METRICS_GET_EXTERNAL_KEY, NOTIFICATION_HOST_DATA_KEY, NOTIFICATION_ID_DATA_KEY, NOTIFICATION_TIMESTAMP_DATA_KEY, NOTIFY_THRESHOLD_KEY, READ_EXTERNAL_KEY, RECEIVED_EVENT_DATA_KEY, RECEIVED_ID_DATA_KEY, 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
static void addData(java.lang.String key, java.util.Dictionary value, int level)
          Add data with the specified key and value parameters.
 void broadcast(java.lang.String key, java.util.Dictionary value)
           
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)
           
static java.lang.String[] getExternalKeys(java.lang.String prefix, java.lang.String[] keys)
           
 NotificationQueue getInformationBroker()
          Returns the informationBroker.
 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)
          Register with the specified externalKeys and listener parameters.
 void register(java.lang.String subscription, NotificationListener listener)
          Register with the specified externalKey and listener parameters.
 void register(java.lang.String subscription, NotificationListener listener, int count)
          Register with the specified subscription, listener and count parameters.
 void run()
          Run.
 void start()
          Start
 void stop()
          Stop.
 void unregister(NotificationListener listener)
          Unregister with the specified listener parameter.
 
Methods inherited from class org.eclipse.soda.dk.notification.NotificationBase
, addNotificationExtension, addNotificationMonitor, broadcastStatus, getBroadcastThreshold, getBroadcastThresholdDefault, getConfigurationInformation, getHost, getLevel, getLevelMaximum, getLevelMinimum, getNotificationExtension, getNotificationMonitor, getNotifyThreshold, getNotifyThresholdDefault, getResource, getStatusInfo, putConfigurationInformation, removeNotificationExtension, removeNotificationMonitor, setBroadcastThreshold, setBroadcastThresholdDefault, setConfigurationInformation, setLevel, setLevelMaximum, setLevelMinimum, setNotificationExtension, setNotificationMonitor, setNotifyThreshold, setNotifyThresholdDefault, setup, updateConfiguration, updateConfiguration
 
Methods inherited from class org.eclipse.soda.dk.notification.NotificationResourceBase
getErrorSeverity, getLogDetails2
 
Methods inherited from class org.eclipse.soda.dk.core.ConfigurableObject
createPropertiesFromHeaders, getConfigurationService, setConfigurationService, validateConfiguration
 
Methods inherited from class org.eclipse.soda.dk.core.EscObject
attemptRecoveryFromError, createDefaultLogService, createException, createException, createInteger, createIntegerTable, createLong, createLongTable, createNumber, format, getBoolean, getCurrentTimestamp, getDefaultLogService, getDefaultResource, getFloat, getId, getIdName, getInt, getLoadLibraryName, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails3, getLogDetails4, getLogDetails5, getLogDetails6, getLogDetails7, getLogLevel, getLogService, getLong, getObject, getOutputName, getReadOnlyEmptyCollection, getReadOnlyEmptyList, getReadOnlyEmptyMap, getSimpleClassName, getStaticBoolean, getStaticFloat, getStaticInt, getStaticLong, getStaticObject, getStaticString, getString, getTraceLevel, getVmLibraryVersion, handleError, handleError, handleError, handleError, handleErrorInternal, handleStaticError, handleStaticException, isDebug, isLogging, isTrace, loadService, log, log, log, report, report, report, report, report, report, reportError, reportSystemInfo, setDebug, setDefaultLogService, setLogService, setTraceLevel, shouldLog, sleep, startupEscStatic, toString, toStringConfigurationKeys, toStringInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.soda.dk.notification.service.NotificationExtendableService
addNotificationExtension, addNotificationMonitor, getNotificationExtension, getNotificationMonitor, removeNotificationExtension, removeNotificationMonitor, setNotificationExtension, setNotificationMonitor
 

Field Detail

Broker

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


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.


queue

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


thread

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

Constructor Detail

Notification

public Notification()
Constructs an instance of this class.

Method Detail

addData

public static void addData(java.lang.String key,
                           java.util.Dictionary value,
                           int level)
Add data with the specified key and value parameters.

Parameters:
key - The key (String) parameter.
value - The value (Dictionary) parameter.
level - The level (int) parameter.

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

broadcast

public void broadcast(java.lang.String key,
                      java.util.Dictionary value)
Specified by:
broadcast in interface NotificationService
Overrides:
broadcast in class org.eclipse.soda.dk.notification.NotificationBase
Parameters:
key - The key (String) parameter.
value - The value (Dictionary) parameter.

exit

public void exit()
Exit.

Overrides:
exit in class org.eclipse.soda.dk.notification.NotificationBase

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)
Description copied from interface: NotificationService
Register with the specified externalKey and listener parameters. The externalKey (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,int), register(String[],NotificationListener)

register

public void register(java.lang.String subscription,
                     NotificationListener listener,
                     int count)
Register with the specified subscription, listener and count parameters.

Parameters:
subscription - The subscription (String) parameter.
listener - The listener (NotificationListener) parameter.
count - The count (int) parameter.
See Also:
register(String,NotificationListener), register(String[],NotificationListener)

register

public void register(java.lang.String[] subscriptions,
                     NotificationListener listener)
Description copied from interface: NotificationService
Register with the specified externalKeys and listener parameters. The externalKeys (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), register(String,NotificationListener,int)

run

public void run()
Run.

Specified by:
run in interface java.lang.Runnable

start

public void start()
Start

Overrides:
start in class org.eclipse.soda.dk.notification.NotificationBase

stop

public void stop()
Stop.


unregister

public void unregister(NotificationListener listener)
Description copied from interface: NotificationService
Unregister with the specified listener parameter. The listener (NotificationListener) parameter.

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

2008-07-29 1.1.0

Copyright (c) 1999, 2008 IBM and others. See license in Legal section. OSGi Framework Version 3.4.0.v20080605-1900