Package org.infinispan.rest
Class RestServer
- java.lang.Object
-
- org.infinispan.server.core.AbstractCacheIgnoreAware
-
- org.infinispan.server.core.AbstractProtocolServer<RestServerConfiguration>
-
- org.infinispan.rest.RestServer
-
- All Implemented Interfaces:
CacheIgnoreAware
,ProtocolServer<RestServerConfiguration>
public class RestServer extends AbstractProtocolServer<RestServerConfiguration>
REST Protocol Server.- Author:
- Sebastian Ćaskawiec
-
-
Field Summary
-
Fields inherited from class org.infinispan.server.core.AbstractProtocolServer
cacheManager, configuration, transport
-
-
Constructor Summary
Constructors Constructor Description RestServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.channel.ChannelInboundHandler
getDecoder()
Gets the decoder for this protocol server.io.netty.channel.ChannelOutboundHandler
getEncoder()
Gets the encoder for this protocol server.io.netty.channel.ChannelInitializer<io.netty.channel.Channel>
getInitializer()
Returns a pipeline factoryRestChannelInitializer
getRestChannelInitializer()
Returns Netty Channel Initializer for REST.int
getWorkerThreads()
int
maxContentLength()
void
setAuthenticator(Authenticator authenticator)
Sets Authentication mechanism.protected void
startInternal(RestServerConfiguration configuration, EmbeddedCacheManager cacheManager)
void
stop()
Stops the server-
Methods inherited from class org.infinispan.server.core.AbstractProtocolServer
getCacheManager, getConfiguration, getExecutor, getHost, getPort, getQualifiedName, getTransport, getTransportStatus, isTransportEnabled, registerServerMBeans, start, startDefaultCache, startTransport, stopTransport, unregisterServerMBeans
-
Methods inherited from class org.infinispan.server.core.AbstractCacheIgnoreAware
ignoreCache, isCacheIgnored, setIgnoredCaches, 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
ignoreCache, isCacheIgnored, setIgnoredCaches, unignore
-
-
-
-
Method Detail
-
getEncoder
public io.netty.channel.ChannelOutboundHandler getEncoder()
Description copied from interface:ProtocolServer
Gets the encoder for this protocol server. The encoder is responsible for writing back common header responses back to client. This method can return null if the server has no encoder. You can find an example of the server that has no encoder in the Memcached server.
-
getDecoder
public io.netty.channel.ChannelInboundHandler getDecoder()
Description copied from interface:ProtocolServer
Gets the decoder for this protocol server. The decoder is responsible for reading client requests. This method cannot return null.
-
getInitializer
public io.netty.channel.ChannelInitializer<io.netty.channel.Channel> getInitializer()
Description copied from interface:ProtocolServer
Returns a pipeline factory
-
getRestChannelInitializer
public RestChannelInitializer getRestChannelInitializer()
Returns Netty Channel Initializer for REST.- Returns:
- Netty Channel Initializer for REST.
-
setAuthenticator
public void setAuthenticator(Authenticator authenticator)
Sets Authentication mechanism.- Parameters:
authenticator
-Authenticator
instance.
-
stop
public void stop()
Description copied from interface:ProtocolServer
Stops the server- Specified by:
stop
in interfaceProtocolServer<RestServerConfiguration>
- Overrides:
stop
in classAbstractProtocolServer<RestServerConfiguration>
-
startInternal
protected void startInternal(RestServerConfiguration configuration, EmbeddedCacheManager cacheManager)
- Overrides:
startInternal
in classAbstractProtocolServer<RestServerConfiguration>
-
getWorkerThreads
public int getWorkerThreads()
- Specified by:
getWorkerThreads
in classAbstractProtocolServer<RestServerConfiguration>
-
maxContentLength
public int maxContentLength()
-
-