当前位置: 首页>>代码示例>>Java>>正文


Java WebApplication.setPageManagerProvider方法代码示例

本文整理汇总了Java中org.apache.wicket.protocol.http.WebApplication.setPageManagerProvider方法的典型用法代码示例。如果您正苦于以下问题:Java WebApplication.setPageManagerProvider方法的具体用法?Java WebApplication.setPageManagerProvider怎么用?Java WebApplication.setPageManagerProvider使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.wicket.protocol.http.WebApplication的用法示例。


在下文中一共展示了WebApplication.setPageManagerProvider方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.apache.wicket.protocol.http.WebApplication; //导入方法依赖的package包/类
@Override
public void init(WebApplication webApplication) {
	
	webApplication.setPageManagerProvider(new DefaultPageManagerProvider(webApplication) {
		protected IDataStore newDataStore() {
			IRedisSettings settings = new RedisSettings();
			settings.setHostname(prop.getHostname());
			settings.setPort(prop.getPort());
			settings.setRecordTtl(TypeParser.parse(prop.getRecordTtl(), prop.getRecordTtlUnit()));
			
			RedisDataStore redisDataStore = new RedisDataStore(settings );
			return new SessionQuotaManagingDataStore(redisDataStore, TypeParser.parse(prop.getSessionSize(), prop.getSessionUnit()));
		}
	});

	wicketEndpointRepository.add(new WicketAutoConfig.Builder(this.getClass())
			.withDetail("properties", prop)
			.build());
	
}
 
开发者ID:MarcGiffing,项目名称:wicket-spring-boot,代码行数:21,代码来源:DataStoreRedisConfig.java

示例2: init

import org.apache.wicket.protocol.http.WebApplication; //导入方法依赖的package包/类
@Override
public void init(WebApplication webApplication) {
	
	webApplication.setPageManagerProvider(new DefaultPageManagerProvider(webApplication) {
		@Override
		protected IDataStore newDataStore() {
			HazelcastDataStore hazelcastDataStore = new HazelcastDataStore(hazelcastInstance);
			return new SessionQuotaManagingDataStore(hazelcastDataStore, TypeParser.parse(prop.getSessionSize(), prop.getSessionUnit()));
		}
	});
	
	wicketEndpointRepository.add(new WicketAutoConfig.Builder(this.getClass())
			.withDetail("properties", prop)
			.build());

}
 
开发者ID:MarcGiffing,项目名称:wicket-spring-boot,代码行数:17,代码来源:DataStoreHazelcastConfig.java

示例3: init

import org.apache.wicket.protocol.http.WebApplication; //导入方法依赖的package包/类
@Override
public void init(WebApplication webApplication) {
	final ICassandraSettings settings = new CassandraSettings();
	settings.getContactPoints().addAll(prop.getContactPoints());
	settings.setTableName(prop.getTableName());
	settings.setKeyspaceName(prop.getKeyspaceName());
	settings.setRecordTtl(TypeParser.parse(prop.getRecordTtl(), prop.getRecordTtlUnit()));

	webApplication.setPageManagerProvider(new DefaultPageManagerProvider(webApplication) {
		@Override
		protected IDataStore newDataStore() {
			return new SessionQuotaManagingDataStore(new CassandraDataStore(settings),
					TypeParser.parse(prop.getSessionSize(), prop.getSessionUnit()));
		}
	});
	
	wicketEndpointRepository.add(new WicketAutoConfig.Builder(this.getClass())
			.withDetail("properties", prop)
			.build());
}
 
开发者ID:MarcGiffing,项目名称:wicket-spring-boot,代码行数:21,代码来源:DataStoreCassandraConfig.java

示例4: init

import org.apache.wicket.protocol.http.WebApplication; //导入方法依赖的package包/类
@Override
public void init(WebApplication webApplication) {
	
	webApplication.setPageManagerProvider(new DefaultPageManagerProvider(webApplication) {
		protected IDataStore newDataStore() {
			IMemcachedSettings settings = new MemcachedSettings();
			settings.setExpirationTime(prop.getExpirationTime());
			settings.setPort(prop.getPort());
			settings.setServerNames(prop.getServerNames());
			settings.setShutdownTimeout(TypeParser.parse(prop.getShutdownTimeout(), prop.getShutdownTimeoutUnit()));
			MemcachedDataStore memcachedDataStore;
			
			try {
				memcachedDataStore = new MemcachedDataStore(settings);
			} catch (IOException e) {
				throw new WicketSpringBootException(e);
			}
			
			return new SessionQuotaManagingDataStore(memcachedDataStore, TypeParser.parse(prop.getSessionSize(), prop.getSessionUnit()));
		}
	});
	
	wicketEndpointRepository.add(new WicketAutoConfig.Builder(this.getClass())
			.withDetail("properties", prop)
			.build());

}
 
开发者ID:MarcGiffing,项目名称:wicket-spring-boot,代码行数:28,代码来源:DataStoreMemcachedConfig.java

示例5: init

import org.apache.wicket.protocol.http.WebApplication; //导入方法依赖的package包/类
@Override
public void init(WebApplication webApplication) {
	DebugPageManagerProvider pageManager = new DebugPageManagerProvider(webApplication);
	webApplication.setPageManagerProvider(pageManager);
	webApplication.mountPage(properties.getMountPage(), DiskStoreBrowserPage.class);
	
	wicketEndpointRepository.add(new WicketAutoConfig.Builder(this.getClass())
			.withDetail("properties", properties)
			.build());
}
 
开发者ID:MarcGiffing,项目名称:wicket-spring-boot,代码行数:11,代码来源:DiskStoreBrowserConfig.java

示例6: init

import org.apache.wicket.protocol.http.WebApplication; //导入方法依赖的package包/类
@Override
public void init(WebApplication webApplication) {

	webApplication.setPageManagerProvider(new DefaultPageManagerProvider(webApplication) {
		@Override
		protected IDataStore newDataStore() {
			return new HttpSessionDataStore(new DefaultPageManagerContext(), new PageNumberEvictionStrategy(props.getPagesNumber()));
		}
	});
	
	wicketEndpointRepository.add(new WicketAutoConfig.Builder(this.getClass())
			.withDetail("properties", props)
			.build());

}
 
开发者ID:MarcGiffing,项目名称:wicket-spring-boot,代码行数:16,代码来源:DataStoreHttpSessionConfig.java


注:本文中的org.apache.wicket.protocol.http.WebApplication.setPageManagerProvider方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。