public class EventHandlers extends CloneableDataObject implements EventHandlersConfiguration
Title: Open Service Framework
Description: This is the Event Handler Registry that encapsulates java.util.Hashtable
.
It is part of the Service Configuration Object
.
Copyright: Copyright (c) 2009
Company: StreamScape Technologies
DEFAULT_SERIAL_VERSION_ID
Constructor and Description |
---|
EventHandlers() |
Modifier and Type | Method and Description |
---|---|
void |
addEventHandler(EventHandler evh)
Add an
Event Handler method to the service configuration. |
java.lang.Object |
clone()
Clones the object.
|
boolean |
existsEventHandler(java.lang.String evhName)
Returns
true if an Event Handler with a given method name is
registered with this service. |
EventHandler |
getEventHandler(java.lang.String evhName)
Retuns the
Event Handler with a specified name. |
EventHandler |
getEventHandlerByMethodName(java.lang.String methodName) |
java.util.List |
getEventHandlers()
Returns all registered
Event Handler instances for this service. |
boolean |
hasEventHandlers()
Returns
true if any Event Handler methods are registered for this service. |
boolean |
hasSinkEvents()
Indicates if the component has any event handlers.
|
java.util.List |
listEventHandlers()
Retuns all the
Event Handler names for this service. |
java.util.List |
listSinkEvents()
Lists all registered events processed by this component's handlers.
|
void |
removeAllEventHandlers()
Removes all registered
Event Handler instances for this service. |
void |
removeEventHandler(java.lang.String evhName)
Remove an
Event Handler method from the service configuration. |
void |
removeEventHandlerByMethodName(java.lang.String methodName) |
getSerialVersionUID
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 void removeEventHandlerByMethodName(java.lang.String methodName) throws ServiceConfigurationException
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 EventHandler getEventHandlerByMethodName(java.lang.String methodName) throws ServiceConfigurationException
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 hasEventHandlers()
EventHandlersConfiguration
true
if any Event Handler
methods are registered for this service.hasEventHandlers
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 java.lang.Object clone()
CloneableDataObject
clone
in interface CloneableObject
clone
in class CloneableDataObject
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.