Interface ProtocolServer<C extends ProtocolServerConfiguration>

All Known Implementing Classes:
AbstractProtocolServer, HotRodServer, MemcachedServer, RestServer

public interface ProtocolServer<C extends ProtocolServerConfiguration>
Represents a protocol compliant server.
Galder ZamarreƱo, wburns
  • Method Details

    • start

      void start(C configuration, EmbeddedCacheManager cacheManager)
      Starts the server backed by the given cache manager, with the corresponding configuration. The cache manager is expected to be completely initialized and started prior to this call.
    • stop

      void stop()
      Stops the server.
    • getEncoder getEncoder()
      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 getDecoder()
      Gets the decoder for this protocol server. The decoder is responsible for reading client requests. This method cannot return null.
    • getConfiguration

      C getConfiguration()
      Returns the configuration used to start this server
    • getInitializer<> getInitializer()
      Returns a pipeline factory
    • getName

      String getName()
      Returns the name of this server
    • getTransport

      Transport getTransport()
      Returns the transport for this server
    • setServerManagement

      void setServerManagement(ServerManagement server, boolean adminEndpoint)
      Sets the ServerManagement instance for this protocol server
    • setEnclosingProtocolServer

      void setEnclosingProtocolServer(ProtocolServer<?> enclosingProtocolServer)
      Sets the enclosing ProtocolServer. Used by the single port server
    • getEnclosingProtocolServer

      ProtocolServer<?> getEnclosingProtocolServer()
      Returns the enclosing ProtocolServer. May be null if this server has none.
    • getChannelMatcher getChannelMatcher()
      Returns a ChannelMatcher which matches channels which belong to this protocol server