Package org.infinispan.server.core
Class AbstractProtocolServer<A extends ProtocolServerConfiguration>
- java.lang.Object
-
- org.infinispan.server.core.AbstractCacheIgnoreAware
-
- org.infinispan.server.core.AbstractProtocolServer<A>
-
- All Implemented Interfaces:
CacheIgnoreAware,ProtocolServer<A>
- Direct Known Subclasses:
HotRodServer,MemcachedServer,RestServer
public abstract class AbstractProtocolServer<A extends ProtocolServerConfiguration> extends AbstractCacheIgnoreAware implements ProtocolServer<A>
A common protocol server dealing with common property parameter validation and assignment and transport lifecycle.- Since:
- 4.1
- Author:
- Galder ZamarreƱo, wburns
-
-
Field Summary
Fields Modifier and Type Field Description protected EmbeddedCacheManagercacheManagerprotected Aconfigurationprotected NettyTransporttransport
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractProtocolServer(java.lang.String protocolName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringdefaultCacheName()EmbeddedCacheManagergetCacheManager()AgetConfiguration()Returns the configuration used to start this serverjava.util.concurrent.ThreadPoolExecutorgetExecutor()java.lang.StringgetHost()java.lang.StringgetName()Returns the name of this serverjava.lang.IntegergetPort()java.lang.StringgetQualifiedName()NettyTransportgetTransport()booleanisTransportEnabled()protected voidregisterServerMBeans()voidstart(A configuration, EmbeddedCacheManager cacheManager)Starts the server backed by the given cache manager and with the corresponding configuration.protected voidstartDefaultCache()protected voidstartInternal(A configuration, EmbeddedCacheManager cacheManager)protected voidstartTransport()voidstop()Stops the serverprotected voidunregisterServerMBeans()-
Methods inherited from class org.infinispan.server.core.AbstractCacheIgnoreAware
getIgnoredCaches, ignoreCache, initialize, isCacheIgnored, unignore
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.server.core.CacheIgnoreAware
getIgnoredCaches, ignoreCache, initialize, isCacheIgnored, unignore
-
Methods inherited from interface org.infinispan.server.core.ProtocolServer
getDecoder, getEncoder, getInitializer
-
-
-
-
Field Detail
-
transport
protected NettyTransport transport
-
cacheManager
protected EmbeddedCacheManager cacheManager
-
configuration
protected A extends ProtocolServerConfiguration configuration
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:ProtocolServerReturns the name of this server- Specified by:
getNamein interfaceProtocolServer<A extends ProtocolServerConfiguration>
-
startInternal
protected void startInternal(A configuration, EmbeddedCacheManager cacheManager)
-
start
public final void start(A configuration, EmbeddedCacheManager cacheManager)
Description copied from interface:ProtocolServerStarts the server backed by the given cache manager and with the corresponding configuration.- Specified by:
startin interfaceProtocolServer<A extends ProtocolServerConfiguration>
-
startTransport
protected void startTransport()
-
getExecutor
public java.util.concurrent.ThreadPoolExecutor getExecutor()
-
registerServerMBeans
protected void registerServerMBeans()
-
unregisterServerMBeans
protected void unregisterServerMBeans() throws java.lang.Exception- Throws:
java.lang.Exception
-
getQualifiedName
public java.lang.String getQualifiedName()
-
stop
public void stop()
Description copied from interface:ProtocolServerStops the server- Specified by:
stopin interfaceProtocolServer<A extends ProtocolServerConfiguration>
-
getCacheManager
public EmbeddedCacheManager getCacheManager()
-
getHost
public java.lang.String getHost()
-
getPort
public java.lang.Integer getPort()
-
getConfiguration
public A getConfiguration()
Description copied from interface:ProtocolServerReturns the configuration used to start this server- Specified by:
getConfigurationin interfaceProtocolServer<A extends ProtocolServerConfiguration>
-
startDefaultCache
protected void startDefaultCache()
-
defaultCacheName
public java.lang.String defaultCacheName()
-
isTransportEnabled
public boolean isTransportEnabled()
-
getTransport
public NettyTransport getTransport()
-
-