Interface ChatHandlerProvider

All Known Implementing Classes:
NoopChatHandlerProvider, ServiceAnnouncingChatHandlerProvider

public interface ChatHandlerProvider
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.common.base.Optional<ChatHandler>
    get(String key)
    Retrieves a chat handler.
    void
    register(String key, ChatHandler handler)
    Registers a chat handler which provides an API for others to talk to objects in the indexing service.
    void
    register(String key, ChatHandler handler, boolean announce)
    Registers a chat handler which provides an API for others to talk to objects in the indexing service.
    void
    Unregisters a chat handler.
  • Method Details

    • register

      void register(String key, ChatHandler handler)
      Registers a chat handler which provides an API for others to talk to objects in the indexing service. Depending on the implementation, this method may also announce this node so that it can be discovered by other services.
      Parameters:
      key - a unique name identifying this service
      handler - instance which implements the API to be exposed
    • register

      void register(String key, ChatHandler handler, boolean announce)
      Registers a chat handler which provides an API for others to talk to objects in the indexing service. Setting announce to false instructs the implementation to only register the handler to expose the API and skip any discovery announcements that might have been broadcast.
      Parameters:
      key - a unique name identifying this service
      handler - instance which implements the API to be exposed
      announce - for implementations that have a service discovery mechanism, whether this node should be announced
    • unregister

      void unregister(String key)
      Unregisters a chat handler.
      Parameters:
      key - the name of the service
    • get

      com.google.common.base.Optional<ChatHandler> get(String key)
      Retrieves a chat handler.
      Parameters:
      key - the name of the service