|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.spray.loader.DefaultTaskLoader
public class DefaultTaskLoader
A default implementation TaskLoader.
Based on ModuleLoader in the Apache Jakarta Turbine project.
| Field Summary |
|---|
| Fields inherited from class org.norther.tammi.core.base.Adaptee |
|---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
DefaultTaskLoader()
Contructs a new loader. |
|
| Method Summary | |
|---|---|
void |
addPackageName(int index,
String pckage)
Adds a package name to the specified location of the task search list. |
void |
addPackageName(String pckage)
Adds a package name to the task search list. |
void |
clearCached()
Clears all cached entries without notifying. |
void |
clearPackageNames()
Clears all package name from the task search list. |
void |
execute(String name,
ServletRequest request,
ServletResponse response,
FilterChain chain,
Object context)
Executes an instance of a task |
void |
expireCached(long timestamp)
Expires all cached entries notifying them about expiration. |
void |
expireFraction(long timestamp,
float fraction)
Expires the specified fraction of cached entries notifying them about expiration. |
ConcurrentMap |
getCache(boolean create)
Gets and optionally creates the cache. |
String[] |
getPackageNames()
Gets package names in the task search list. |
long |
getRefreshed()
Gets the last refresh timestamp. |
boolean |
initialize(String name,
ServletRequest request,
ServletResponse response,
FilterChain chain,
Object context)
Initializes an instance of a task without execution. |
boolean |
isCachingDisabled()
Checks whether the caching is disabled. |
boolean |
isScriptingEnabled()
Checks whether scripting is enabled. |
protected Task |
load(String name,
ServletRequest request,
ServletResponse response,
FilterChain chain,
Object context)
Loads an instance of a task. |
void |
refresh()
Refreshes the MBean. |
void |
removeCache()
Removes the cache. |
void |
removePackageName(String pckage)
Removes a package name from the task search list. |
void |
setCachingDisabled(boolean flag)
Sets the caching disabled flag. |
void |
setPackageNames(String[] pckages)
Sets package names in the task search list. |
void |
setScriptingEnabled(boolean flag)
Sets the scripting enabled flag. |
| Methods inherited from class org.norther.tammi.core.base.Adaptee |
|---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, postmanaged, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unmanaged, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultTaskLoader()
| Method Detail |
|---|
public boolean isCachingDisabled()
CacheClient
isCachingDisabled in interface CacheClientpublic void setCachingDisabled(boolean flag)
CacheClient
setCachingDisabled in interface CacheClientflag - the caching disabled flag.public void expireCached(long timestamp)
CacheClient
expireCached in interface CacheClienttimestamp - the timestamp of the expiration.
public void expireFraction(long timestamp,
float fraction)
CacheClient
expireFraction in interface CacheClienttimestamp - the timestamp of the expiration.fraction - the fraction of entries to expire (0.0..1.0).public void clearCached()
CacheClient
clearCached in interface CacheClientpublic ConcurrentMap getCache(boolean create)
CacheClient
getCache in interface CacheClientcreate - true to create a missing cache.
public void removeCache()
CacheClient
removeCache in interface CacheClientpublic void refresh()
Refreshable
refresh in interface Refreshablepublic long getRefreshed()
Refreshable
getRefreshed in interface Refreshablepublic boolean isScriptingEnabled()
TaskLoader
isScriptingEnabled in interface TaskLoaderpublic void setScriptingEnabled(boolean flag)
TaskLoader
setScriptingEnabled in interface TaskLoaderflag - the scripting enabled flag.public String[] getPackageNames()
TaskLoader
getPackageNames in interface TaskLoaderpublic void setPackageNames(String[] pckages)
TaskLoader
setPackageNames in interface TaskLoaderpckages - an array of package names.public void addPackageName(String pckage)
TaskLoader
addPackageName in interface TaskLoaderpckage - the package name to add.
public void addPackageName(int index,
String pckage)
TaskLoader
addPackageName in interface TaskLoaderindex - an index in the list.pckage - the package name to add.public void removePackageName(String pckage)
TaskLoader
removePackageName in interface TaskLoaderpckage - the package name to remove.public void clearPackageNames()
TaskLoader
clearPackageNames in interface TaskLoader
public boolean initialize(String name,
ServletRequest request,
ServletResponse response,
FilterChain chain,
Object context)
TaskLoader
initialize in interface TaskLoadername - the name of the task.request - the request.response - the response.chain - the filter chain.context - a task specific context.
public void execute(String name,
ServletRequest request,
ServletResponse response,
FilterChain chain,
Object context)
throws ExecutionException,
InterruptedException
TaskLoader
execute in interface TaskLoadername - the name of the task.request - the request.response - the response.chain - the filter chain.context - a task specific context.
ExecutionException - for execution errors.
InterruptedException - if a task is interrupted.
protected Task load(String name,
ServletRequest request,
ServletResponse response,
FilterChain chain,
Object context)
name - the name of the task.request - the request.response - the response.chain - the filter chain.context - a task specific context.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||