com.spss.psapi.extensions.common.spi2

Interface ExtensionDelegate



  • public interface ExtensionDelegate
    Defines the methods supported by an extension delegate. One extension delegate instance is created per extension which is shared within a process. Since a single process may support sessions in different locales, no locale information is available to the extension delegate. The path of the implementing class is specified in the "extensionDelegate" attribute of the CommonObjects element in the extension.xml file.
    Since:
    PSAPI 17.0
    Author:
    Julian Clinton
    • Method Detail

      • initExtensionDelegate

        void initExtensionDelegate(ExtensionContext extensionContext)
        Called when an extension is being initialised. Typically this happens once during the lifetime of a process although some environments may support the loading and unloading of extensions multiple times.
        Parameters:
        extensionContext - the extension context
      • disposeExtensionDelegate

        void disposeExtensionDelegate(ExtensionContext extensionContext)
        Called when the associated extension is being disposed of. This allows a delegate to dispose of any system resources it has allocated during its lifetime. Typically this happens once during the lifetime of a process although some environments may support the loading and unloading of extensions multiple times.

        Note that this method may not always be called in embedded environments such as application servers.

        Parameters:
        extensionContext - the extension context
      • startupExtension

        void startupExtension(StartupContext startupContext,
                            ExtensionContext extensionContext)
        Called at application startup when the extension is first loaded to allow an extension to initialise its global state, process command line arguments, allocate necessary resources etc. Implementing methods should not perform any interaction with the user nor perform anything requiring a UI since this method will also be called for batch mode operations.

        Note that this method may not be called in embedded environments such as application servers.

        Note also that if the method processes command line arguments it should notify the context using the notifyCommandLineArgumentHandled() method. If this does not happen, the application will assume that an argument is invalid and may abort.

        Note that this method may not be called in embedded environments such as application servers.

        Parameters:
        startupContext - the startup context for the application
        extensionContext - the extension context
        See Also:
        StartupContext.notifyCommandLineArgumentHandled(String)
      • shutdownExtension

        void shutdownExtension(ShutdownContext shutdownContext,
                             ExtensionContext extensionContext)
        Called at application shutdown to allow an extension to tidy up its global state, deallocate any system resources etc. Implementing methods should not attempt to perform any interaction with the user nor perform anything requiring a UI since this method will also be called for batch mode operations.

        Note that this method may not always be called in embedded environments such as application servers.

        Parameters:
        shutdownContext - the context in which the application is being shutdown
        extensionContext - the extension context

Copyright © 2014 Integral Solutions Ltd. All Rights Reserved.