Class NotificationHandler

All Implemented Interfaces:
ISupportsAccessModifier, IConfigurableObject, INotScriptFriendly, ISupportsDeprecation, IDiffableObject, IAlertProvider, IAvatar, IEntityLifeCycleEvent, IEventMetadataProvider, IEventProvider, IPersistable, IPropertyProvider, IServiceMetadataProvider, IServiceProvider, IShapeProvider, ITaggableObject, IDependencyScannableObject, IImportDependencyHandler, IHierarchicalEntity, IEntityDefinition, IPersistableObject<String>, IDesignTimeSecurable, IDesignTimeSecurableEntity, IRunTimeSecurable, IRunTimeSecurableEntity, ISecurable, IVisibilitySecurable, IVisibilitySecurableEntity, IEventProcessor, IAspectContainer, INamedObject, Serializable

@ThingworxExtensionApiClass(since={7,4}, canInstantiate=true) public class NotificationHandler extends Thing

The thing template implemented by Things that are capable of processing notifications. Handlers are defined by propagating rows into the Handlers configuration table; this may be done in the XML for the Thing Template or Thing that implements this thing template. Handlers are read and cached by the platform whenever the entity is created or the configuration tables are updated, which is then leveraged by the NotificationContent and NotificationDefinition entities as part of the notifications infrastructure.

It is crucial that subclasses call the superclass method for the Thing.dispose() and Thing.initializeThing(com.thingworx.system.ContextType) methods. Failure to do so could prevent handlers from being recognized by the Platform.

See Also:
  • Constructor Details

    • NotificationHandler

      public NotificationHandler()
  • Method Details

    • getHandlerIDForService

      @ThingworxExtensionApiMethod(since={7,4}) protected String getHandlerIDForService(String serviceName) throws Exception


      Return the handlerID corresponding to the given service name.
      Parameters:
      serviceName - The name of the implementing service for the handler
      Returns:
      The ID of the handler
      Throws:
      Exception - if the handlers configuration table cannot be retrieved