Class AbstractXWikiRunnable

  • All Implemented Interfaces:
    Runnable
    Direct Known Subclasses:
    XWikiStatsStoreService

    public abstract class AbstractXWikiRunnable
    extends Object
    implements Runnable
    Base class for any XWiki daemon class. It provide tools to initialize execution context.
    Since:
    1.8.4, 1.9RC1, 2.0M1
    Version:
    $Id: 2c888779077d6c739cd7581a00238738bf912915 $
    • Constructor Detail

      • AbstractXWikiRunnable

        protected AbstractXWikiRunnable()
      • AbstractXWikiRunnable

        protected AbstractXWikiRunnable​(String propertyName,
                                        Object propertyValue)
        Parameters:
        propertyName - the name of the property to put in the initialized context
        propertyValue - the value of the property to put in the initialized context
      • AbstractXWikiRunnable

        protected AbstractXWikiRunnable​(Map<String,​Object> properties)
        Parameters:
        properties - properties to put in the initialized context
    • Method Detail

      • declareProperties

        protected void declareProperties​(org.xwiki.context.ExecutionContext executionContext)
        Lets subclasses declare execution context properties.
        Parameters:
        executionContext - the execution context.
      • initExecutionContext

        protected org.xwiki.context.ExecutionContext initExecutionContext()
                                                                   throws org.xwiki.context.ExecutionContextException
        Initialize execution context for the current thread.
        Returns:
        the new execution context
        Throws:
        org.xwiki.context.ExecutionContextException - error when try to initialize execution context
      • cleanupExecutionContext

        protected void cleanupExecutionContext()
      • run

        public final void run()
        Specified by:
        run in interface Runnable