net.sf.sasl.language.placeholder.aop.resolver
Class ThreadPlaceholderResolver
java.lang.Object
net.sf.sasl.language.placeholder.aop.resolver.ThreadPlaceholderResolver
- All Implemented Interfaces:
- IPlaceholderResolver
public class ThreadPlaceholderResolver
- extends Object
- implements IPlaceholderResolver
The Placeholder resolver offers placeholder to get access to thread
statistics.
curThreadId
Returns the thread id the placeholder script interpreter is running at.
curThreadName
Returns the thread name the placeholder script interpreter is running at.
totalThreadCount
Returns the estimated number of threads currently running in the jvm process
- Since:
- 0.0.1 (sasl-common-aspect-library)
- Author:
- Philipp Förmer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreadPlaceholderResolver
public ThreadPlaceholderResolver()
getResolveablePlaceholders
public Set<String> getResolveablePlaceholders()
- Description copied from interface:
IPlaceholderResolver
- Returns a set of all placeholder procedures names that can be resolved by
the placeholder.
- Specified by:
getResolveablePlaceholders
in interface IPlaceholderResolver
- Returns:
- non null.
- See Also:
IPlaceholderResolver.getResolveablePlaceholders()
resolve
public Object resolve(String placeholderName,
Object[] placeholderArguments,
IEnvironment environment)
throws ResolveException
- Description copied from interface:
IPlaceholderResolver
- Resolves the given placeholder under the passed interpreter environment.
The placeholderArguments are static defined (in a placeholder script) or
dynamic created parameters (by other placeholder calls) that are passed
to the placeholder as procedure arguments.
The resolve method is only invoked for placeholders that the resolver
defines that he offers them (IPlaceholderResolver.getResolveablePlaceholders()
).
- Specified by:
resolve
in interface IPlaceholderResolver
- Parameters:
placeholderName
- non null.placeholderArguments
- non null.environment
- non null
- Returns:
- null or non null.
- Throws:
ResolveException
- if the placeholder could not get resolved, for example
because the parameters mismatch, or the resolution is only
successful for a specific target method execution phase.- See Also:
IPlaceholderResolver.resolve(java.lang.String,
java.lang.Object[],
net.sf.sasl.language.placeholder.aop.interpreter.IEnvironment)
Copyright © 2010. All Rights Reserved.