com.xpn.xwiki.util
Class AbstractXWikiRunnable

java.lang.Object
  extended by com.xpn.xwiki.util.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: 4fef7b9d42c75c7b9cfc5a106d8f94c1e3e51bd3 $

Constructor Summary
protected AbstractXWikiRunnable()
           
protected AbstractXWikiRunnable(Map<String,Object> properties)
           
protected AbstractXWikiRunnable(String propertyName, Object propertyValue)
           
 
Method Summary
protected  void cleanupExecutionContext()
           
protected  void declareProperties(org.xwiki.context.ExecutionContext executionContext)
          Lets subclasses declare execution context properties.
protected  org.xwiki.context.ExecutionContext initExecutionContext()
          Initialize execution context for the current thread.
 void run()
           
protected abstract  void runInternal()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

runInternal

protected abstract void runInternal()


Copyright © 2004–2014 XWiki. All rights reserved.