Interface IPlaceholderResolver

All Known Implementing Classes:
DatePlaceholderResolver, DurationPlaceholderResolver, EnvironmentPlaceholderResolver, ExceptionPlaceholderResolver, HostPlaceholderResolver, MathPlaceholderResolver, MemoryPlaceholderResolver, StringPlaceholderResolver, TargetPlaceholderResolver, ThreadPlaceholderResolver, TypeValuePlaceholderResolver

public interface IPlaceholderResolver

Interface defines methods that a placeholder resolver must implement. The implementation must be thread safe.
A placeholder is some kind of procedure in other programming languages. A placeholder has got a symbol name and between [0, M] parameters. Placeholders could be used in placeholder scripts to assemble some free styled dynamic string output. A placeholder resolver is a package of [0, N] placeholders, which encapsulates the logic for the placeholders that the package offers.
A placeholder could be for example "add" to which [2, M] number parameters could be passed. A resolver which offers the "add" placeholder would than encapsulate the logic how to add [2, M] numbers and return the computed output back to the placeholder script interpreter, which invoked the resolver.

0.0.1 (sasl-common-aspect-library)
Philipp Förmer

Method Summary
 Set<String> getResolveablePlaceholders()
          Returns a set of all placeholder procedures names that can be resolved by the placeholder.
 Object resolve(String placeholderName, Object[] placeholderArguments, IEnvironment environment)
          Resolves the given placeholder under the passed interpreter environment.

Method Detail


Set<String> getResolveablePlaceholders()
Returns a set of all placeholder procedures names that can be resolved by the placeholder.

non null.
0.0.1 (sasl-common-aspect-library)


Object resolve(String placeholderName,
               Object[] placeholderArguments,
               IEnvironment environment)
               throws ResolveException
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 (getResolveablePlaceholders()).

placeholderName - non null.
placeholderArguments - non null.
environment - non null
null or non null.
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.
0.0.1 (sasl-common-aspect-library)

Copyright © 2010. All Rights Reserved.