public class AbstractServiceConfigurationObject extends CloneableDataObject implements ConfigurationObject, MetricsConfiguration, AdvisoriesConfiguration, EventHandlersConfiguration, ServiceConfigurationProperties, ExceptionsConfiguration, ActionableEventsConfiguration, EventTriggersConfiguration, AdvancedPropertiesConfiguration, SystemDataObject
Title: Open Service Framework
Description: The Abstract Interface for a Service Configuration Object
.
This is the base abstract
class for the a Service Configuration
. The abstract allows
developers to create their own instances of a configuration class that are Service-class specific. However, the default
class ServiceConfigurationObject
should be good enough for most services and their implementations.
The following service properties are indigenous to all services in the framework.
Semantic Type
.Class
that implements the Service logic.Event Identity Manager Plug-in
. May be set to none
for clarity.property Validator
class. Defaults to com.streamscape.service.ui.validators.DefaultValidator
.InvokeMode.DIRECT
.false
.false
.
They may be treated and populated in accordance with the Service Hosting Container
. Hence based on the specific
hosting environment a validator may be provided that handles these values appropriately. The default validator will only validate
objects for correctness of type and in case of Class Names
the validator will perform a limited class path check to
ensure that classes are available in the class path.
Copyright: Copyright (c) 2009
Company: StreamScape Technologies
DEFAULT_SERIAL_VERSION_ID
Constructor and Description |
---|
AbstractServiceConfigurationObject() |
Modifier and Type | Method and Description |
---|---|
void |
addActionableEvent(java.lang.String eventId)
Adds an actionable event and its prototype to the list of supported events.
|
void |
addAdvancedProperty(ConfigurationProperty property)
Adds an advanced property to the configuration.
|
void |
addAdvisory(java.lang.String eventId)
This method adds a standard
Advisory to the configuration. |
void |
addEventHandler(EventHandler evh)
Add an
Event Handler method to the service configuration. |
void |
addEventTrigger(java.lang.String triggerName)
Adds new event trigger to the configuration
|
void |
addEventTriggerData(EventTriggerData eventTriggerData) |
void |
addException(java.lang.String eventId)
This method adds a standard
Advisory to the configuration. |
void |
addMetric(MetricDefinition metric)
This method adds a
Metric to the Service Configuration. |
void |
addProperty(ServiceConfigurationProperty property)
Adds a configuration property definition to the structure.
|
void |
addPropertyGroup(java.lang.String groupName)
Adds a property group to the Service definition.
|
void |
addStateAdvisory(StateAdvisoryDefinition advisory)
This method adds a
State Advisory to the Service Configuration. |
java.lang.Object |
clone()
Clones the object.
|
ConfigurationProperty |
createAdvancedProperty(java.lang.String propertyName,
java.lang.String propertyLabel,
java.lang.String propertyDescription)
Creates an advanced property that utilizes the dotted notation.
|
EventHandler |
createEventHandler(java.lang.String methodName,
java.lang.String handlerName)
Creates an empty instance of a
Service Event Handler definition. |
MetricDefinition |
createMetric(java.lang.String metricName)
Creates an instance of a
Service Metric definition. |
ServiceConfigurationProperty |
createProperty(java.lang.String propertyName,
ServicePropertyType propertyType,
java.lang.String propertyGroup)
Create an instance of a
Service Configuration Property . |
StateAdvisoryDefinition |
createStateAdvisory(java.lang.String eventId)
Creates an empty instance of a
State Notification definition. |
boolean |
existsActionableEvent(java.lang.String eventId)
Checks if an event with the specified id is registered as actionable.
|
boolean |
existsAdvancedProperty(java.lang.String propertyName)
Returns
true if this configuration has a specific advanced property. |
boolean |
existsAdvisory(java.lang.String snName)
Returns
true if the specific advisory event is registered. |
boolean |
existsEventHandler(java.lang.String evhName)
Returns
true if an Event Handler with a given method name is
registered with this service. |
boolean |
existsEventTrigger(java.lang.String triggerName)
Checks if an event trigger with the specified name exists in the configuration.
|
boolean |
existsException(java.lang.String eventId)
Returns
true if the specific exception event is registered. |
boolean |
existsMetric(java.lang.String metricName)
Retuns
true if this metric is registered in the Service Configuration. |
boolean |
existsPropertyGroup(java.lang.String groupName)
Verifies is a property group exists in this
Service Configuration Object . |
java.util.List |
getAdvancedProperties()
Returns an enumeration of advanced property objects.
|
ConfigurationProperty |
getAdvancedProperty(java.lang.String propertyName)
Returns the
ConfigurationProperty object for a given property. |
java.lang.String |
getDefaultPropertyGroup()
Returns the default property group names
main.group . |
java.lang.String |
getEIMPluginName()
Gets the
Event Identity Manager name for this service. |
EventHandler |
getEventHandler(java.lang.String evhName)
Retuns the
Event Handler with a specified name. |
java.util.List |
getEventHandlers()
Returns all registered
Event Handler instances for this service. |
EventTriggerData |
getEventTriggerData(java.lang.String triggerName)
Returns event trigger data.
|
InvokeMode |
getInvokeMode()
Gets the invoke mode for this service.
|
MetricDefinition |
getMetric(java.lang.String metricName)
Returns the specific
Metric instance for this Service Configuration. |
java.util.List |
getMetrics()
Returns an
Enumeration of Metric instances. |
java.util.List |
getProperties()
Returns an enumeration of
ServiceConfigurationProperty instances for this configuration. |
java.util.List |
getPropertiesForGroup(java.lang.String groupName)
Returns an enumeration of properties for a specific group.
|
ServiceConfigurationProperty |
getProperty(java.lang.String name)
Gets a property instance by name.
|
java.util.List |
getPropertyGroups()
Returns an enumeration of all property groups.
|
java.util.List |
getPropertyNames()
Returns the list of all configuration property names.
|
java.lang.String |
getServiceClassName()
Returns the name of the Class that implements the service.
|
ServiceConfigurationProperties |
getServiceConfigurationProperties()
Returns the
Service Configuration Properties object |
java.lang.String |
getServiceDescription()
Returns the description of this services functional capabilities.
|
java.lang.String |
getServiceDisplayName()
Returns the display name (user friendly name) of the service.
|
java.lang.String |
getServiceName()
Sets the name of the Service instance.
|
java.lang.String |
getServiceType()
Gets the Service Type for this service.
|
StateAdvisoryDefinition |
getStateAdvisoryDefinition(java.lang.String advisoryName)
Get State Advisory definition object from the Service Configuration.
|
java.util.List |
getStateAdvisoryDefinitions()
Returns an enumeration of configured state advisory definitions.
|
java.util.Date |
getTimestamp()
Returns a timestamp of when this object was created or last modified.
|
java.lang.String |
getValidatorName()
Get the name of the
Validator class to be used by this service. |
boolean |
hasActionableEvents()
Indicates if the component has actionable events.
|
boolean |
hasAdvancedProperties()
Returns
true if this configuration has advanced properties defined. |
boolean |
hasAdvisories()
Returns
true if the component has advisory events. |
boolean |
hasEIMPlugin()
Checks whether this service has an
Event Identity Manager plugin defined. |
boolean |
hasEventHandlers()
Returns
true if any Event Handler methods are registered for this service. |
boolean |
hasEventTriggers()
Indicates if the configuration has event triggers.
|
boolean |
hasExceptions()
Returns
true if the component has exception events. |
boolean |
hasMetrics()
Retuns
true if this Service Configuration has metrics defined. |
boolean |
hasProperty(java.lang.String name)
Checck for the xistence of a configuration property with a certain name.
|
boolean |
hasSinkEvents()
Indicates if the component has any event handlers.
|
boolean |
isDaemonService() |
boolean |
isInterruptableService()
Returns
true if this service may be interrupted by calling it's cancel()
method by using the Event Handler with the same name. |
java.util.List |
listActionableEvents()
Lists all registered actionable events for this component.
|
java.util.List |
listAdvancedProperties()
Lists all the property names.
|
java.util.List |
listAdvisories()
Returns list of all advisory prototypes exposed by
this component.
|
java.util.List |
listEventHandlers()
Retuns all the
Event Handler names for this service. |
java.util.List |
listEventTriggers()
Returns a list of event triggers set on this component.
|
java.util.List |
listExceptions()
List all exception events by their Event ID.
|
java.util.List |
listMetrics()
Lists metrics for this service type.
|
java.util.List |
listSinkEvents()
Lists all registered events processed by this component's handlers.
|
java.lang.String |
lookupAdvancedProperty(java.lang.String propertyName)
Returns the value of a particular property or
null if the property does not exist. |
void |
removeActionableEvent(java.lang.String eventId)
Remove an actionable event from the list of supported types.
|
void |
removeAdvancedProperty(java.lang.String propertyName)
Removes an advanced property from the configuration.
|
void |
removeAdvisory(java.lang.String advisoryName)
Removes the advisory from the Service Configuration.
|
void |
removeAllActionableEvents()
Removes all actionable events.
|
void |
removeAllAdvancedProperties()
Removes all the advanced properties from a given configuration.
|
void |
removeAllAdvisories()
Removes all advisories from the Service Configuration.
|
void |
removeAllEventHandlers()
Removes all registered
Event Handler instances for this service. |
void |
removeAllEventTriggers()
Removes all event triggers from this configuration.
|
void |
removeAllExceptions()
Removes all exceptions from the Service Configuration.
|
void |
removeAllMetrics()
Removes all
Metric definitions from this Service Configuration. |
void |
removeAllProperties()
Removes all the property names from the list.
|
void |
removeEventHandler(java.lang.String evhName)
Remove an
Event Handler method from the service configuration. |
void |
removeEventTrigger(java.lang.String triggerName)
Removes a trigger from the configuration.
|
void |
removeException(java.lang.String eventId) |
void |
removeMetric(java.lang.String metricName)
Removes a
Metric from the Service Configuration. |
void |
removeProperty(java.lang.String name)
Removes a configuration property definition from the structure.
|
void |
removePropertyGroup(java.lang.String groupName)
Removes a property group from the
Service Configuration Object . |
void |
setActionableEventId(java.lang.String oldId,
java.lang.String newId)
Sets the
eventId of the actionable event. |
void |
setDaemonService(boolean isDaemon)
Enables this service to run as a daemon thread in the
Service Hosting Framework . |
void |
setDefaults()
Sets default values for all configuration properties.
|
void |
setEIMPluginName(java.lang.String name)
Sets the
Event Identity Manager class for this service. |
void |
setInterruptableService(boolean isInterruptable)
Sets the status of the service to interruptable or non-interruptable.
|
void |
setInvokeMode(InvokeMode type)
Sets the invoke model for this service.
|
void |
setServiceClassName(java.lang.String className)
Sets the name of the Class that implements this Service.
|
void |
setServiceDescription(java.lang.String desc)
Sets the description of this services functional capabilities.
|
void |
setServiceDisplayName(java.lang.String displayName)
Sets the user friendly name of the service.
|
void |
setServiceName(java.lang.String name)
Sets the name of the Service instance.
|
void |
setServiceType(java.lang.String type)
Sets the Service Type denoting the function a service performs (ie.
|
void |
setValidatorName(java.lang.String validatorClassName)
Sets the name of the
Validator class to be used by this service when validating
service configuration properties. |
void |
touch()
Alters the timestamp of the object to reflect the exact time this object was
last touched.
|
ServiceConfigurationValidatorResults |
validate()
An internal implementation of the
Service Configruation Property validator. |
getSerialVersionUID
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSerialVersionUID
public java.lang.String getServiceName()
ConfigurationObject
getServiceName
in interface ConfigurationObject
public void setServiceName(java.lang.String name)
ConfigurationObject
Entity Repository
when set by a factory class.setServiceName
in interface ConfigurationObject
name
- String Service Instance Namepublic void setServiceType(java.lang.String type)
ConfigurationObject
Repository
when set by a factory class.setServiceType
in interface ConfigurationObject
type
- String Service type.public java.lang.String getServiceType()
ConfigurationObject
getServiceType
in interface ConfigurationObject
public void setServiceDisplayName(java.lang.String displayName)
ConfigurationObject
setServiceDisplayName
in interface ConfigurationObject
displayName
- Stringpublic java.lang.String getServiceDisplayName()
ConfigurationObject
getServiceDisplayName
in interface ConfigurationObject
public void setServiceDescription(java.lang.String desc)
ConfigurationObject
setServiceDescription
in interface ConfigurationObject
desc
- Stringpublic java.lang.String getServiceDescription()
ConfigurationObject
getServiceDescription
in interface ConfigurationObject
public boolean isDaemonService()
isDaemonService
in interface ConfigurationObject
public void setDaemonService(boolean isDaemon)
ConfigurationObject
Service Hosting Framework
. Due to
Java limitations on multiple inheritance services may not extend the service framework as well as Thread
interfaces. Daemon mechanisms however, allow a service to be run as a thread under control of a given
run-time environment of a service. Whether a daemon service is invoked in a separate Java thread or a container-
managed thread is up to the implementer. Typically a daemon implementation will launch a service
on a separate Java thread as runnable. Alternative mechanism may be available depending on the hosting environment.
A daemon service is analogies to a worker thread in Java parlance and must have a single active method called
run()
with an associate Event Handler
registered. It's life cycle is managed by the Service
Hosting Container
. After a daemon service is started and the start()
method completes the hosting
framework will automatically invoke the run()
method.
Setting this parameter to true
will implicitly add an appropriate daemon Event Handler
to the configuration.
If the value is set to false
the event handler is automatically removed from the configuration.
Given the decoupled nature of a service configuration and the class that it is describing any
inconsistencies should be resolved by invoking the EventHandlerValidator
on the service.
WARNING!! When a Service is declared as a Daemon Service
by setting this parameter to true
all Event Handler definitions on this service are dropped and a run()
Event Handler method is automatically added.
This overrides all prior Event Handler definitions.
When this parameter is set to false
the run()
Event Handler method is dropped from the configuration.
Only those Services declared as Daemon Service
may have a run()
Event Handler method. If a standard
Service contains such a method a ServiceConfigurationException
is thrown during validation.
setDaemonService
in interface ConfigurationObject
isDaemon
- booleanpublic boolean isInterruptableService()
ConfigurationObject
true
if this service may be interrupted by calling it's cancel()
method by using the Event Handler
with the same name. An interruptable service must
have a cancel()
method.isInterruptableService
in interface ConfigurationObject
public void setInterruptableService(boolean isInterruptable) throws ServiceConfigurationException
ConfigurationObject
cancel()
method that, when invoked will interrupt and abort the execution of an
Event Handler
method. For example if an Event Handler
method is executing a database
query or a network operation, such an operation may be interrupted after some time by calling the service cancel()
method.
When this parameter is set to true
an appropriate interruptable Event Handler
will be added to the service configuration. When set to false
, if a handler for the cancel()
method exists it will be removed from the configuration. Given the decoupled nature of a service configuration
and the class it describes any inconsistencies should be resolved by invoking the EventHandlerValidator
on the service. An interruptable service need not have all of its Event Handlers
specify a timeout. Each
handler has the option of specifying its own timeout.
setInterruptableService
in interface ConfigurationObject
isInterruptable
- booleanServiceConfigurationException
public void setServiceClassName(java.lang.String className)
ConfigurationObject
setServiceClassName
in interface ConfigurationObject
className
- String Class name that implements the Service.public java.lang.String getServiceClassName()
ConfigurationObject
getServiceClassName
in interface ConfigurationObject
public void setInvokeMode(InvokeMode type)
ConfigurationObject
Fabric Event Dispatcher
. Types are specified in InvokeMode
and signify the following:
setInvokeMode
in interface ConfigurationObject
type
- InvokeMode Invoke type.InvokeMode
public InvokeMode getInvokeMode()
ConfigurationObject
getInvokeMode
in interface ConfigurationObject
InvokeMode
public java.lang.String getEIMPluginName()
ConfigurationObject
Event Identity Manager
name for this service.getEIMPluginName
in interface ConfigurationObject
public void setEIMPluginName(java.lang.String name)
ConfigurationObject
Event Identity Manager
class for this service. The EIM sets dynamic values for
CorrelationID
, EventGroup
and EventKey
for a given service.
These values can be used to correlate Events, Notifications and other objects back to the Units of Work
that initiated them, allowing such units to be composed into pipelines or processes by monitoring and
process visualisation tools.setEIMPluginName
in interface ConfigurationObject
name
- String Plugin class name.public boolean hasEIMPlugin()
ConfigurationObject
Event Identity Manager
plugin defined.hasEIMPlugin
in interface ConfigurationObject
True
if the plugin is registered and false
if not.public boolean hasMetrics()
MetricsConfiguration
true
if this Service Configuration has metrics defined.hasMetrics
in interface MetricsConfiguration
public boolean existsMetric(java.lang.String metricName)
MetricsConfiguration
true
if this metric is registered in the Service Configuration.existsMetric
in interface MetricsConfiguration
metricName
- Stringpublic void addMetric(MetricDefinition metric) throws ServiceConfigurationException
MetricsConfiguration
Metric
to the Service Configuration. Besides having a name and a description, all metrics allow users
to set minimum and maximum threshold values. A threshold may be used to denote a limit or a range (by setting the maximum and minimum).
It also offers the option to emit a State Notification
whe a threshold is crossed. The actual implementation is left up to
the implementer of the MetricsFactory
interface.addMetric
in interface MetricsConfiguration
metric
- MetricDefinitionServiceConfigurationException
- If a problem occurs when adding the metric.public void removeMetric(java.lang.String metricName) throws ServiceConfigurationException
MetricsConfiguration
Metric
from the Service Configuration.removeMetric
in interface MetricsConfiguration
metricName
- String Name of the Metric.ServiceConfigurationException
- If the metric being removed is not found.public void removeAllMetrics()
MetricsConfiguration
Metric
definitions from this Service Configuration.removeAllMetrics
in interface MetricsConfiguration
public MetricDefinition getMetric(java.lang.String metricName) throws ServiceConfigurationException
MetricsConfiguration
Metric
instance for this Service Configuration.getMetric
in interface MetricsConfiguration
metricName
- String Name of Metric.ServiceConfigurationException
- If there is a problem or if the metric does nto exist.public java.util.List getMetrics()
MetricsConfiguration
Enumeration
of Metric instances.getMetrics
in interface MetricsConfiguration
public java.util.List listMetrics()
MetricsConfiguration
listMetrics
in interface MetricsConfiguration
public boolean hasAdvisories()
FabricEventAdvisorySource
true
if the component has advisory events.hasAdvisories
in interface FabricEventAdvisorySource
public boolean existsAdvisory(java.lang.String snName)
FabricEventAdvisorySource
true
if the specific advisory event is registered.existsAdvisory
in interface FabricEventAdvisorySource
snName
- Stringpublic void addStateAdvisory(StateAdvisoryDefinition advisory) throws ServiceConfigurationException
AdvisoriesConfiguration
State Advisory
to the Service Configuration. An advisory consists of a
name and type of notification based on StateAdvisoryType
, properties and a text message.
Properties are text based name/value pairs and may further provide additional information about the event, such as
Event Identity Tracking Information
or similar information such as return codes or event source identifiers.
The actual notification object is an instance of StateAdvisory
based on a StateAdvisoryDefinition
. The
event definition is used by the advisory factory to initialize an instance of the event object.addStateAdvisory
in interface AdvisoriesConfiguration
advisory
- StateAdvisoryDefinitionServiceConfigurationException
public void addAdvisory(java.lang.String eventId) throws ServiceConfigurationException
AdvisoriesConfiguration
Advisory
to the configuration. This method is typically used
internally by the configuration logic to add or remove advisories that may be raised by various conditions.
However users may register any advisories they need by supplying their associate prototype. Unregistered
advisories may not be raised.addAdvisory
in interface AdvisoriesConfiguration
eventId
- StringServiceConfigurationException
public void removeAdvisory(java.lang.String advisoryName) throws ServiceConfigurationException
AdvisoriesConfiguration
removeAdvisory
in interface AdvisoriesConfiguration
advisoryName
- StringServiceConfigurationException
public StateAdvisoryDefinition getStateAdvisoryDefinition(java.lang.String advisoryName) throws ServiceConfigurationException
AdvisoriesConfiguration
getStateAdvisoryDefinition
in interface AdvisoriesConfiguration
advisoryName
- StringServiceConfigurationException
public java.util.List getStateAdvisoryDefinitions()
AdvisoriesConfiguration
getStateAdvisoryDefinitions
in interface AdvisoriesConfiguration
public java.util.List listAdvisories()
FabricEventAdvisorySource
The prototypes for such events are added to the advisory registry. This interface allows public, component level visibility to all such advisories that may be used by a component.
listAdvisories
in interface FabricEventAdvisorySource
public void removeAllAdvisories()
AdvisoriesConfiguration
removeAllAdvisories
in interface AdvisoriesConfiguration
public ServiceConfigurationProperty createProperty(java.lang.String propertyName, ServicePropertyType propertyType, java.lang.String propertyGroup) throws ServiceConfigurationException
Service Configuration Property
. The type of property to be created is
specified by using an enmeration specificed in ServicePropertyType
.propertyName
- String Property name.propertyType
- String The enumerated type of property.propertyGroup
- String the name of the property group. If null
the default 'main.group' is set.ServiceConfigurationException
public ConfigurationProperty createAdvancedProperty(java.lang.String propertyName, java.lang.String propertyLabel, java.lang.String propertyDescription)
String
and Long
.propertyName
- StringpropertyLabel
- StringpropertyDescription
- Stringpublic EventHandler createEventHandler(java.lang.String methodName, java.lang.String handlerName) throws ServiceConfigurationException
Service Event Handler
definition. The user has to set all appropriate
values. Event Handlers are described in the EventHandler
documentation.methodName
- StringhandlerName
- StringServiceConfigurationException
public MetricDefinition createMetric(java.lang.String metricName) throws ServiceConfigurationException
Service Metric
definition. The user has to set all appropriate values.
Metrics are described in detail in the Metric
documentation.metricName
- String The hierarchical name of a metric.ServiceConfigurationException
- if improper values are specific.public StateAdvisoryDefinition createStateAdvisory(java.lang.String eventId) throws ServiceConfigurationException
State Notification
definition. The user has to set all appropriate values.
Notifications are described in detail in the StateAdvisoryDefinition
documentation.eventId
- StringServiceConfigurationException
public void addProperty(ServiceConfigurationProperty property) throws ServiceConfigurationException
ServiceConfigurationProperties
ServiceConfigurationProperty
documentation.addProperty
in interface ServiceConfigurationProperties
property
- ServiceConfigurationProperty A property structure.ServiceConfigurationException
public void removeProperty(java.lang.String name) throws ServiceConfigurationException
ServiceConfigurationProperties
removeProperty
in interface ServiceConfigurationProperties
name
- String A property name.ServiceConfigurationException
public ServiceConfigurationProperty getProperty(java.lang.String name) throws ServiceConfigurationException
ServiceConfigurationProperties
getProperty
in interface ServiceConfigurationProperties
name
- String The name of a property.ServiceConfigurationException
public java.util.List getPropertyNames()
ServiceConfigurationProperties
getPropertyNames
in interface ServiceConfigurationProperties
public void removeAllProperties()
ServiceConfigurationProperties
removeAllProperties
in interface ServiceConfigurationProperties
public java.util.List getProperties()
ServiceConfigurationProperties
ServiceConfigurationProperty
instances for this configuration.getProperties
in interface ServiceConfigurationProperties
public void setValidatorName(java.lang.String validatorClassName)
ConfigurationObject
Validator
class to be used by this service when validating
service configuration properties.setValidatorName
in interface ConfigurationObject
validatorClassName
- String Name of the validator class.public java.lang.String getValidatorName()
ConfigurationObject
Validator
class to be used by this service.getValidatorName
in interface ConfigurationObject
public boolean hasProperty(java.lang.String name)
ServiceConfigurationProperties
hasProperty
in interface ServiceConfigurationProperties
name
- Stringfalse
.public ServiceConfigurationValidatorResults validate()
Service Configruation Property
validator. This method
expects all the global variables have been resolved. However a validator will typically treat unresolved
definitions as valid since it is text.validate
in interface ServiceConfigurationValidator
public java.lang.String getDefaultPropertyGroup()
ServiceConfigurationProperties
main.group
. This group may be deleted
by developers. The method simply returns the default name.getDefaultPropertyGroup
in interface ServiceConfigurationProperties
public void addPropertyGroup(java.lang.String groupName)
ServiceConfigurationProperties
ServiceConfigurationProperty.setGroup(String)
method. By default all properties are part of a default group called main.group
. As a convention it is
recommended that group names follow the same format and use the .group
extension.addPropertyGroup
in interface ServiceConfigurationProperties
groupName
- String Group name.public void removePropertyGroup(java.lang.String groupName)
ServiceConfigurationProperties
Service Configuration Object
.removePropertyGroup
in interface ServiceConfigurationProperties
groupName
- String Group name.public boolean existsPropertyGroup(java.lang.String groupName)
ServiceConfigurationProperties
Service Configuration Object
.existsPropertyGroup
in interface ServiceConfigurationProperties
groupName
- String Group name.True
if the group exists, otherwise false
.public java.util.List getPropertyGroups()
ServiceConfigurationProperties
java.util.Vector
so that its order would be preserved during serialization. In this way the group list can be used to drive UI Wizard
panel sequences or the order in which Property Cards
display their content.getPropertyGroups
in interface ServiceConfigurationProperties
public java.util.List getPropertiesForGroup(java.lang.String groupName) throws ServiceConfigurationException
ServiceConfigurationProperties
getPropertiesForGroup
in interface ServiceConfigurationProperties
groupName
- String Group name.ServiceConfigurationException
- if a group does not exist or if other processing errors occur.public void setDefaults()
ConfigurationObject
ServiceConfigurationProperty
instances and invokes their ServiceConfigurationProperty.applyDefault()
method.setDefaults
in interface ConfigurationObject
public ServiceConfigurationProperties getServiceConfigurationProperties()
ConfigurationObject
Service Configuration Properties
objectgetServiceConfigurationProperties
in interface ConfigurationObject
public boolean hasEventHandlers()
EventHandlersConfiguration
true
if any Event Handler
methods are registered for this service.hasEventHandlers
in interface EventHandlersConfiguration
public void addEventHandler(EventHandler evh) throws ServiceConfigurationException
EventHandlersConfiguration
Event Handler
method to the service configuration. Multiple calls to add a handler with the same method
name will result in overlaying the previous handler with the same name. Currently only one handler may be specified for a
given method regardless of the methods signature. Multiple definitions of the same method are not supported.addEventHandler
in interface EventHandlersConfiguration
evh
- EventHandler Event handler definition.ServiceConfigurationException
public void removeEventHandler(java.lang.String evhName) throws ServiceConfigurationException
EventHandlersConfiguration
Event Handler
method from the service configuration. Attempting to remove a handler that does
not exist will result in no action and no exception.removeEventHandler
in interface EventHandlersConfiguration
evhName
- String The name of the method associated with the handler.ServiceConfigurationException
public EventHandler getEventHandler(java.lang.String evhName) throws ServiceConfigurationException
EventHandlersConfiguration
Event Handler
with a specified name.getEventHandler
in interface EventHandlersConfiguration
evhName
- String The name of the method associated with the handler.ServiceConfigurationException
public java.util.List getEventHandlers()
EventHandlersConfiguration
Event Handler
instances for this service.getEventHandlers
in interface EventHandlersConfiguration
public java.util.List listEventHandlers()
EventHandlersConfiguration
Event Handler
names for this service.listEventHandlers
in interface EventHandlersConfiguration
public void removeAllEventHandlers()
EventHandlersConfiguration
Event Handler
instances for this service.removeAllEventHandlers
in interface EventHandlersConfiguration
public boolean existsEventHandler(java.lang.String evhName)
EventHandlersConfiguration
true
if an Event Handler
with a given method name is
registered with this service.existsEventHandler
in interface EventHandlersConfiguration
evhName
- Stringpublic java.util.List listSinkEvents()
FabricEventSink
listSinkEvents
in interface FabricEventSink
public boolean hasSinkEvents()
FabricEventSink
hasSinkEvents
in interface FabricEventSink
true
if the component has registered events, false
otherwise.public EventTriggerData getEventTriggerData(java.lang.String triggerName)
FabricEventTriggerSource
getEventTriggerData
in interface FabricEventTriggerSource
public void addEventTriggerData(EventTriggerData eventTriggerData) throws ServiceConfigurationException
ServiceConfigurationException
public void addEventTrigger(java.lang.String triggerName) throws ServiceConfigurationException
EventTriggersConfiguration
addEventTrigger
in interface EventTriggersConfiguration
ServiceConfigurationException
public void removeEventTrigger(java.lang.String triggerName) throws ServiceConfigurationException
EventTriggersConfiguration
removeEventTrigger
in interface EventTriggersConfiguration
triggerName
- StringServiceConfigurationException
public void removeAllEventTriggers()
EventTriggersConfiguration
removeAllEventTriggers
in interface EventTriggersConfiguration
public boolean hasEventTriggers()
FabricEventTriggerSource
hasEventTriggers
in interface FabricEventTriggerSource
true
if the configuration has event triggers, false
otherwise.public boolean existsEventTrigger(java.lang.String triggerName)
FabricEventTriggerSource
existsEventTrigger
in interface FabricEventTriggerSource
triggerName
- the specified trigger name.true
if an event trigger with the specified name exists, false
otherwise.public java.util.List listEventTriggers()
FabricEventTriggerSource
listEventTriggers
in interface FabricEventTriggerSource
public void addAdvancedProperty(ConfigurationProperty property)
AdvancedPropertiesConfiguration
addAdvancedProperty
in interface AdvancedPropertiesConfiguration
property
- ConfigurationPropertypublic void removeAdvancedProperty(java.lang.String propertyName)
AdvancedPropertiesConfiguration
removeAdvancedProperty
in interface AdvancedPropertiesConfiguration
propertyName
- Stringpublic java.util.List getAdvancedProperties()
AdvancedPropertiesConfiguration
getAdvancedProperties
in interface AdvancedPropertiesConfiguration
public java.util.List listAdvancedProperties()
AdvancedPropertiesConfiguration
listAdvancedProperties
in interface AdvancedPropertiesConfiguration
public java.lang.String lookupAdvancedProperty(java.lang.String propertyName)
AdvancedPropertiesConfiguration
null
if the property does not exist.lookupAdvancedProperty
in interface AdvancedPropertiesConfiguration
propertyName
- Stringpublic ConfigurationProperty getAdvancedProperty(java.lang.String propertyName)
AdvancedPropertiesConfiguration
ConfigurationProperty
object for a given property. Returns
null
if the property does not exist.getAdvancedProperty
in interface AdvancedPropertiesConfiguration
propertyName
- Stringpublic void removeAllAdvancedProperties()
AdvancedPropertiesConfiguration
removeAllAdvancedProperties
in interface AdvancedPropertiesConfiguration
public boolean hasAdvancedProperties()
AdvancedPropertiesConfiguration
true
if this configuration has advanced properties defined.hasAdvancedProperties
in interface AdvancedPropertiesConfiguration
public boolean existsAdvancedProperty(java.lang.String propertyName)
AdvancedPropertiesConfiguration
true
if this configuration has a specific advanced property.existsAdvancedProperty
in interface AdvancedPropertiesConfiguration
propertyName
- Stringpublic java.util.Date getTimestamp()
SystemDataObject
getTimestamp
in interface SystemDataObject
public void touch()
SystemDataObject
touch
in interface SystemDataObject
public void addActionableEvent(java.lang.String eventId) throws ServiceConfigurationException
ActionableEventsConfiguration
addActionableEvent
in interface ActionableEventsConfiguration
eventId
- StringServiceConfigurationException
public void setActionableEventId(java.lang.String oldId, java.lang.String newId) throws ServiceConfigurationException
ActionableEventsConfiguration
eventId
of the actionable event. This method is intended for use
with service configuration tools after the prototype has been defined. It allows users to
specify the real name of the actionable event rather then the prototype name used as a
place holder.setActionableEventId
in interface ActionableEventsConfiguration
oldId
- StringnewId
- StringServiceConfigurationException
public void removeActionableEvent(java.lang.String eventId) throws ServiceConfigurationException
ActionableEventsConfiguration
removeActionableEvent
in interface ActionableEventsConfiguration
eventId
- StringServiceConfigurationException
public void removeAllActionableEvents()
ActionableEventsConfiguration
removeAllActionableEvents
in interface ActionableEventsConfiguration
public java.util.List listActionableEvents()
FabricEventSource
listActionableEvents
in interface FabricEventSource
public boolean hasActionableEvents()
FabricEventSource
hasActionableEvents
in interface FabricEventSource
true
if the component has actionable events, false
otherwise.public boolean existsActionableEvent(java.lang.String eventId)
FabricEventSource
existsActionableEvent
in interface FabricEventSource
eventId
- the specified event id.true
if an actionable event with the specified id exists, false
otherwise.public java.util.List listExceptions()
FabricExceptionsSource
listExceptions
in interface FabricExceptionsSource
public boolean hasExceptions()
FabricExceptionsSource
true
if the component has exception events.hasExceptions
in interface FabricExceptionsSource
public boolean existsException(java.lang.String eventId)
FabricExceptionsSource
true
if the specific exception event is registered.existsException
in interface FabricExceptionsSource
eventId
- Stringpublic void addException(java.lang.String eventId) throws ServiceConfigurationException
ExceptionsConfiguration
Advisory
to the configuration. This method is typically used
internally by the configuration logic to add or remove advisories that may be raised by various conditions.
However users may register any advisories they need by supplying their associate prototype. Unregistered
advisories may not be raised.addException
in interface ExceptionsConfiguration
eventId
- StringServiceConfigurationException
public void removeException(java.lang.String eventId) throws ServiceConfigurationException
removeException
in interface ExceptionsConfiguration
ServiceConfigurationException
public void removeAllExceptions()
ExceptionsConfiguration
removeAllExceptions
in interface ExceptionsConfiguration
public java.lang.Object clone()
CloneableDataObject
clone
in interface CloneableObject
clone
in class CloneableDataObject
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.