Search in sources :

Example 11 with EmbeddedServerAdminOperationHandler

use of org.infinispan.server.core.admin.embeddedserver.EmbeddedServerAdminOperationHandler in project infinispan by infinispan.

the class EndpointInteroperabilityTest method setup.

@BeforeClass
protected void setup() throws Exception {
    cacheManager = TestCacheManagerFactory.createServerModeCacheManager();
    cacheManager.defineConfiguration(DEFAULT_CACHE_NAME, getDefaultCacheConfiguration().build());
    cacheManager.defineConfiguration(MARSHALLED_CACHE_NAME, getMarshalledCacheConfiguration().build());
    cacheManager.defineConfiguration(STRING_CACHE_NAME, getStringsCacheConfiguration().build());
    RestServerConfigurationBuilder builder = new RestServerConfigurationBuilder();
    builder.port(findFreePort());
    restServer = new RestServer();
    restServer.setServerManagement(new DummyServerManagement(), true);
    restServer.start(builder.build(), cacheManager);
    RestClientConfigurationBuilder clientBuilder = new RestClientConfigurationBuilder();
    RestClientConfiguration configuration = clientBuilder.addServer().host(restServer.getHost()).port(restServer.getPort()).build();
    restClient = RestClient.forConfiguration(configuration);
    HotRodServerConfigurationBuilder serverBuilder = new HotRodServerConfigurationBuilder();
    serverBuilder.adminOperationsHandler(new EmbeddedServerAdminOperationHandler());
    hotRodServer = startHotRodServer(cacheManager, serverBuilder);
    defaultRemoteCache = createRemoteCacheManager(IdentityMarshaller.INSTANCE).getCache(DEFAULT_CACHE_NAME);
    defaultMarshalledRemoteCache = createRemoteCacheManager(null).getCache(MARSHALLED_CACHE_NAME);
    stringRemoteCache = createRemoteCacheManager(new UTF8StringMarshaller()).getCache(STRING_CACHE_NAME);
}
Also used : RestServer(org.infinispan.rest.RestServer) RestServerConfigurationBuilder(org.infinispan.rest.configuration.RestServerConfigurationBuilder) RestClientConfiguration(org.infinispan.client.rest.configuration.RestClientConfiguration) RestClientConfigurationBuilder(org.infinispan.client.rest.configuration.RestClientConfigurationBuilder) EmbeddedServerAdminOperationHandler(org.infinispan.server.core.admin.embeddedserver.EmbeddedServerAdminOperationHandler) UTF8StringMarshaller(org.infinispan.commons.marshall.UTF8StringMarshaller) DummyServerManagement(org.infinispan.server.core.DummyServerManagement) HotRodServerConfigurationBuilder(org.infinispan.server.hotrod.configuration.HotRodServerConfigurationBuilder) BeforeClass(org.testng.annotations.BeforeClass)

Example 12 with EmbeddedServerAdminOperationHandler

use of org.infinispan.server.core.admin.embeddedserver.EmbeddedServerAdminOperationHandler in project infinispan by infinispan.

the class RemoteQueryRepeatedMappingTest method createHotRodServer.

@Override
protected HotRodServer createHotRodServer() {
    HotRodServerConfigurationBuilder serverBuilder = new HotRodServerConfigurationBuilder();
    serverBuilder.adminOperationsHandler(new EmbeddedServerAdminOperationHandler());
    return HotRodClientTestingUtil.startHotRodServer(cacheManager, serverBuilder);
}
Also used : EmbeddedServerAdminOperationHandler(org.infinispan.server.core.admin.embeddedserver.EmbeddedServerAdminOperationHandler) HotRodServerConfigurationBuilder(org.infinispan.server.hotrod.configuration.HotRodServerConfigurationBuilder)

Example 13 with EmbeddedServerAdminOperationHandler

use of org.infinispan.server.core.admin.embeddedserver.EmbeddedServerAdminOperationHandler in project infinispan by infinispan.

the class JCacheCreateCachePredefinedTest method createHotRodServer.

protected HotRodServer createHotRodServer() {
    HotRodServerConfigurationBuilder serverBuilder = new HotRodServerConfigurationBuilder();
    serverBuilder.adminOperationsHandler(new EmbeddedServerAdminOperationHandler());
    return HotRodClientTestingUtil.startHotRodServer(cacheManager, serverBuilder);
}
Also used : EmbeddedServerAdminOperationHandler(org.infinispan.server.core.admin.embeddedserver.EmbeddedServerAdminOperationHandler) HotRodServerConfigurationBuilder(org.infinispan.server.hotrod.configuration.HotRodServerConfigurationBuilder)

Aggregations

EmbeddedServerAdminOperationHandler (org.infinispan.server.core.admin.embeddedserver.EmbeddedServerAdminOperationHandler)13 HotRodServerConfigurationBuilder (org.infinispan.server.hotrod.configuration.HotRodServerConfigurationBuilder)13 GlobalConfigurationBuilder (org.infinispan.configuration.global.GlobalConfigurationBuilder)5 EmbeddedCacheManager (org.infinispan.manager.EmbeddedCacheManager)5 PrivateGlobalConfigurationBuilder (org.infinispan.configuration.internal.PrivateGlobalConfigurationBuilder)4 HotRodServer (org.infinispan.server.hotrod.HotRodServer)4 RemoteCacheManager (org.infinispan.client.hotrod.RemoteCacheManager)3 ConfigurationBuilder (org.infinispan.configuration.cache.ConfigurationBuilder)3 BeforeClass (org.testng.annotations.BeforeClass)3 ConfigurationBuilder (org.infinispan.client.hotrod.configuration.ConfigurationBuilder)2 PrivilegedActionException (java.security.PrivilegedActionException)1 Properties (java.util.Properties)1 CachingProvider (javax.cache.spi.CachingProvider)1 HotRodClientTestingUtil.killRemoteCacheManager (org.infinispan.client.hotrod.test.HotRodClientTestingUtil.killRemoteCacheManager)1 HotRodClientTestingUtil.newRemoteConfigurationBuilder (org.infinispan.client.hotrod.test.HotRodClientTestingUtil.newRemoteConfigurationBuilder)1 RestClientConfiguration (org.infinispan.client.rest.configuration.RestClientConfiguration)1 RestClientConfigurationBuilder (org.infinispan.client.rest.configuration.RestClientConfigurationBuilder)1 UTF8StringMarshaller (org.infinispan.commons.marshall.UTF8StringMarshaller)1 TimeService (org.infinispan.commons.time.TimeService)1 JCacheTestingUtil (org.infinispan.jcache.util.JCacheTestingUtil)1