本文整理汇总了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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}