public class CompositeMappingStrategy extends Object implements MappingStrategy
Example:
new CompositeMappingStrategy(
new ResourceBundleMappingStrategy(),
new ClassNameMappingStrategy());
This creates a new mapping strategy that first tries to look up the script
in fastagi-mapping.properties and - if the properties file is
not present on the classpath or contains no mapping for the request - uses
a ClassNameMappingStrategy to get the script.ResourceBundleMappingStrategy,
ClassNameMappingStrategy| Constructor and Description |
|---|
CompositeMappingStrategy()
Creates a new empty CompositeMappingStrategy.
|
CompositeMappingStrategy(List<MappingStrategy> strategies)
Creates a new CompositeMappingStrategy.
|
CompositeMappingStrategy(MappingStrategy... strategies)
Creates a new CompositeMappingStrategy.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addStrategy(MappingStrategy strategy)
Adds a strategy (at the end of the list).
|
AgiScript |
determineScript(AgiRequest request,
AgiChannel channel)
Returns the AgiScript instance that is responsible to handle
the given request.
|
void |
setStrategies(List<MappingStrategy> strategies)
Sets the strategies to use.
|
public CompositeMappingStrategy()
public CompositeMappingStrategy(MappingStrategy... strategies)
strategies - the strategies to use.public CompositeMappingStrategy(List<MappingStrategy> strategies)
strategies - the strategies to use.public void addStrategy(MappingStrategy strategy)
strategy - the strategy to add.public void setStrategies(List<MappingStrategy> strategies)
strategies - the strategies to use.public AgiScript determineScript(AgiRequest request, AgiChannel channel)
MappingStrategydetermineScript in interface MappingStrategyrequest - the request to lookup.channel - the channel.null if none could be determined by this strategy.Copyright © 2004–2024. All rights reserved.