Interface TransformerAccessor


  • public interface TransformerAccessor

    Allows a Transformer module access to the main interfaces it requires to interact with the Transformer core.

    • Field Detail

      • F_LISTENER_ACCESSORY

        static final int F_LISTENER_ACCESSORY
        Setting this flag on subscribe will cause the subscriber to behave as an accessory listener. Accessory listeners will not necessarily result in objects being requested by the Transformer. Instead, the 'accessory listener' listens to subscriptions made by other subscribing clients.

        Objects which are 'listened to' by an accessory listener can be discarded and dropped from the Transformer cache. This can occur when there are no other subscribing clients.
        See Also:
        Constant Field Values
    • Method Detail

      • getDataCache

        DataCache getDataCache()

        Returns an object that allows the Transformer module to access the data cached within the Transformer's core.

        Returns:
        The DataCache object.
      • getPipelineRegistrar

        PipelineRegistrar getPipelineRegistrar()

        Returns an object that allows the Transformer module to register methods for availability in pipelines

        Returns:
        The PipelineRegistrar object.
      • getUDPAccessor

        UDPAccessor getUDPAccessor()

        Returns an object that allows the Transformer module to access the Transformer core's UDP command interface. The module will be able to register and deregister listeners for UDP commands, and send its own UDP commands.

        Returns:
        The UDPAccessor object.
      • getLogDirectory

        String getLogDirectory()
        Gets the logging directory configured for the Transformer
        Returns:
        The directory where log files are stored
      • getLogger

        Logger getLogger()

        Returns the Logger that should be used with this module

        Returns:
        The Logger for this module
      • expandFilename

        String expandFilename​(String filename)

        Returns a fully qualified filename based on % substitution fields.

        The possible substitution fields are:

        • %a - the application name.
        • %n - the application name.
        • %r - the application root.
        Parameters:
        filename - The filename, including % substitution fields, to expand.
        Returns:
        The expanded filename.
        Throws:
        NullPointerException - If the filename is null.
      • getPersistence

        Persistence getPersistence()
        Returns:
        An object providing access to the Transformer persistence service.
      • createActiveSubscription

        TransformerActiveSub createActiveSubscription​(String subject,
                                                      SubscriptionListener subscriptionListener)

        Creates an active subscription to an individual subject.

         

        If a data service has been configured that matches the given subject and active peers within that data service are connected, a request will be made to those peers for the specified subject.

         

        All events whose subjects match the method's subject parameter are passed to the given SubscriptionListener.

        To initialise the subscription, it is necessary to call TransformerActiveSub.subscribe() on the returned TransformerActiveSub object.
        Parameters:
        subject - The subject to subscribe to.
        subscriptionListener - A listener to receive events raised for the ActiveSubscription.
        Returns:
        An TransformerActiveSub.
      • createActiveSubscription

        TransformerActiveSub createActiveSubscription​(String subject,
                                                      SubscriptionListener subscriptionListener,
                                                      int subscriptionFlags)

        Creates an active subscription to an individual subject.

         

        If a data service has been configured that matches the given subject and active peers within that data service are connected, a request will be made to those peers for the specified subject.

         

        All events whose subjects match the method's subject parameter are passed to the given SubscriptionListener.

        To initialise the subscription, it is necessary to call TransformerActiveSub.subscribe() on the returned TransformerActiveSub object.
        Parameters:
        subject - The subject to subscribe to.
        subscriptionListener - A listener to receive events raised for the ActiveSubscription.
        subscriptionFlags - Flags to set on the active subscription. Flags can be F_LISTENER_ACCESSORY and F_DEFAULT
        Returns:
        An TransformerActiveSub.
      • getFieldManager

        FieldManager getFieldManager()
        Gets the datasource field manager
        Returns:
        FieldManager
      • getGlobalPublisher

        TransformerPublisher getGlobalPublisher()
        Gets the global Publisher. This publisher enables messages to be published by the Transformer without registering as an active publisher. Useful if this module needs to publish updates to a subject when a provider has been registered by another module.
        Returns:
        The global publisher