本文整理汇总了Java中org.apache.tapestry5.ioc.OrderedConfiguration.addInstance方法的典型用法代码示例。如果您正苦于以下问题:Java OrderedConfiguration.addInstance方法的具体用法?Java OrderedConfiguration.addInstance怎么用?Java OrderedConfiguration.addInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.tapestry5.ioc.OrderedConfiguration
的用法示例。
在下文中一共展示了OrderedConfiguration.addInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addDataCollectors
import org.apache.tapestry5.ioc.OrderedConfiguration; //导入方法依赖的package包/类
@Contribute(DataCollectionService.class)
public static void addDataCollectors(
OrderedConfiguration<DataCollectionService> configuration,
Logger logger, DatabaseManagerService databaseManagerService) {
// We do not care about order constraints for the moment
// USE AUTOBUILD - Note that Now the collector with all its' own logger
// and not the DataCollectionService one
configuration.addInstance("state-transitions",
TransitionSequenceCollector.class);
configuration.add("controller-results", new ControllerResultsCollector(
logger, databaseManagerService));
configuration.add("service-results", new ServiceResultsCollector(
logger, databaseManagerService));
configuration.add("clients-results", new ClientsResultsCollector(
logger, databaseManagerService));
}
示例2: addLinkTransformers
import org.apache.tapestry5.ioc.OrderedConfiguration; //导入方法依赖的package包/类
/**
* Contributes the link transformers.
* @param configuration an {@link OrderedConfiguration}.
*/
@Contribute(PageRenderLinkTransformer.class)
@Primary
public static void addLinkTransformers(OrderedConfiguration<PageRenderLinkTransformer> configuration) {
configuration.addInstance("SubdomainTag", SubdomainTagLinkTransformer.class);
configuration.addInstance("SubdomainPage", SubdomainPageLinkTransformer.class, "before:SubdomainTag");
}
示例3: provideTransformWorkers
import org.apache.tapestry5.ioc.OrderedConfiguration; //导入方法依赖的package包/类
@Contribute(ComponentClassTransformWorker2.class)
public static void provideTransformWorkers(
OrderedConfiguration<ComponentClassTransformWorker2> configuration)
{
configuration.addInstance("IncludeStylesheet", IncludeStylesheetWorker.class);
configuration.addInstance("IncludeJavaScriptLibrary", IncludeJavaScriptLibraryWorker.class);
}
示例4: setupObjectProviders
import org.apache.tapestry5.ioc.OrderedConfiguration; //导入方法依赖的package包/类
/**
* Contribute the CLIOption/CLIInput injection services
*
* @param configuration
*
* @category UserContributions MasterObjectProvider
*/
@Contribute(MasterObjectProvider.class)
public static void setupObjectProviders(
OrderedConfiguration<ObjectProvider> configuration) {
configuration.addInstance("CLIOption", CLIOptionObjectProvider.class,
"before:AnnotationBasedContributions");
configuration.addInstance("CLIInput", CLIInputObjectProvider.class,
"before:AnnotationBasedContributions");
}
示例5: addDataCollectors
import org.apache.tapestry5.ioc.OrderedConfiguration; //导入方法依赖的package包/类
@Contribute(CLIValidator.class)
public static void addDataCollectors(
/**
* @category Resource
*/
Logger logger,
/**
* @category UserContributions
*/
OrderedConfiguration<CLIValidator> configuration) {
configuration.addInstance("SumValidator", SumValidator.class,
"before:*");
}
示例6: contributeRequestHandler
import org.apache.tapestry5.ioc.OrderedConfiguration; //导入方法依赖的package包/类
@Contribute(ComponentRequestHandler.class)
public static void contributeRequestHandler(
final OrderedConfiguration<ComponentRequestFilter> configuration,
@Symbol(value = NEW_RELIC_DISABLED) boolean disabled
) {
if(!disabled) {
configuration.addInstance("NewRelicWebTransactionsRequestFilter", WebTransactionsRequestFilter.class, "after:*");
}
}
示例7: contributeMarkupRenderer
import org.apache.tapestry5.ioc.OrderedConfiguration; //导入方法依赖的package包/类
public static void contributeMarkupRenderer(final OrderedConfiguration<MarkupRendererFilter> configuration) {
configuration.addInstance("modal-support", ModalSupportMarkupRenderer.class,
OrderConstraintBuilder.afterAll().build());
}
示例8: addReactAPIRequestFilter
import org.apache.tapestry5.ioc.OrderedConfiguration; //导入方法依赖的package包/类
@Contribute(RequestHandler.class)
public static void addReactAPIRequestFilter(final OrderedConfiguration<RequestFilter> configuration) {
configuration.addInstance("react-api", ReactAPIFilter.class);
}
示例9: addCsrfFilter
import org.apache.tapestry5.ioc.OrderedConfiguration; //导入方法依赖的package包/类
@Contribute(ComponentEventRequestHandler.class)
public static void addCsrfFilter(OrderedConfiguration<ComponentEventRequestFilter> configuration)
{
configuration.addInstance("csrf", CsrfProtectionFilter.class, "before:*");
}
示例10: addChannelProviders
import org.apache.tapestry5.ioc.OrderedConfiguration; //导入方法依赖的package包/类
/**
* Contributes to the {@link ChannelProvider} service.
* @param configuration an {@link OrderedConfiguration}.
*/
@Contribute(ChannelProvider.class)
public static void addChannelProviders(OrderedConfiguration<ChannelProvider> configuration) {
configuration.addInstance("Tag", TagChannelProvider.class);
}
示例11: contributeOAuthServiceAdapter
import org.apache.tapestry5.ioc.OrderedConfiguration; //导入方法依赖的package包/类
@Contribute(OAuthServiceAdapter.class)
public static void contributeOAuthServiceAdapter(final OrderedConfiguration<OAuthServiceAdapter> configuration) {
configuration.addInstance("1.0", OAuth10ServiceAdapter.class, "before:*");
configuration.addInstance("2.0", OAuth20ServiceAdapter.class, "after:1.0");
}
示例12: contributeAccessTokenExtractor
import org.apache.tapestry5.ioc.OrderedConfiguration; //导入方法依赖的package包/类
@Contribute(AccessTokenExtractor.class)
public static void contributeAccessTokenExtractor(final OrderedConfiguration<AccessTokenExtractor> configuration) {
configuration.addInstance("Session", SessionAccessTokenExtractor.class, "before:*");
}
示例13: provideOAuthDispatchers
import org.apache.tapestry5.ioc.OrderedConfiguration; //导入方法依赖的package包/类
@Contribute(Dispatcher.class)
@Primary
public static void provideOAuthDispatchers(final OrderedConfiguration<Dispatcher> configuration) {
configuration.addInstance("OAuthCallback", CallbackDispatcher.class, "before:*");
}
示例14: contributePageRenderLinkTransformer
import org.apache.tapestry5.ioc.OrderedConfiguration; //导入方法依赖的package包/类
/**
* Contributes {@link RssLinkTransformer}.
* @param configuration an {@link OrderedConfiguration}.
*/
@Primary
public static void contributePageRenderLinkTransformer(OrderedConfiguration<PageRenderLinkTransformer> configuration) {
configuration.addInstance("Rss", RssLinkTransformer.class);
}
示例15: contributeURLRewriter
import org.apache.tapestry5.ioc.OrderedConfiguration; //导入方法依赖的package包/类
/**
* Contributes the URL rewriters.
* @param configuration an {@link OrderedConfiguration}.
*/
public static void contributeURLRewriter(OrderedConfiguration<URLRewriterRule> configuration) {
configuration.addInstance("Subomain", SubdomainURLRewriterRule.class, "before:*");
}