fr.paris.lutece.portal.service.daemon
Class RunnableQueueItem

java.lang.Object
  extended by fr.paris.lutece.portal.service.daemon.RunnableQueueItem
All Implemented Interfaces:
Runnable

public class RunnableQueueItem
extends Object
implements Runnable

Represents a runnable waiting to be launched by the ThreadLauncherDaemon


Constructor Summary
RunnableQueueItem(Runnable runnable, String strKey, Plugin plugin)
          Creates a new RunnableQueueItem
 
Method Summary
protected  String computeKey()
          Compute the key of the item from its plugin name and the declared key.
 String getKey()
          Get the key that identifies the runnable.
 Plugin getPlugin()
          Get the plugin that created the runnable
 Runnable getRunnable()
          Get the runnable that is waiting for its execution
 void run()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunnableQueueItem

public RunnableQueueItem(Runnable runnable,
                         String strKey,
                         Plugin plugin)
Creates a new RunnableQueueItem

Parameters:
runnable - The runnable waiting to bet launched
strKey - The key associated with the runnable. Runnables of a given plugin are ensured that they will not be executed at the same time if they have the same key.
plugin - The plugin associated with the runnable queue item
Method Detail

run

public void run()

Specified by:
run in interface Runnable

getRunnable

public Runnable getRunnable()
Get the runnable that is waiting for its execution

Returns:
The runnable

getKey

public String getKey()
Get the key that identifies the runnable.

Returns:
the key of the runnable

getPlugin

public Plugin getPlugin()
Get the plugin that created the runnable

Returns:
The plugin that created the runnable

computeKey

protected String computeKey()
Compute the key of the item from its plugin name and the declared key. The difference between the computed key and the defined key is that the computed key is unique, whereas the defined key is unique within a plugin.

Returns:
The computed key of this runnable item


Copyright © 2014 Mairie de Paris. All Rights Reserved.