Interface GlobalServiceExportConsumer


  • public interface GlobalServiceExportConsumer
    This interface marks a CommunicationService to need a global service export. The global service export allows a communication service register a service without a public URI at the global registry and thus make the service globally available without acting as server.
    • Method Detail

      • requiresGlobalServiceExport

        boolean requiresGlobalServiceExport()
        Gets whether this consumer really requires a global service export. Distinguishing on the implementation (by extending this interface) is not enough. For instance, a communication service only needs a global service in client mode but not in server mode.
        Returns:
        Whether this consumer really requires a global service export.
      • setExportService

        void setExportService​(Supplier<SessionFactory> sfProvider,
                              String clusterName,
                              GlobalRegistryServiceProvider globRegProvider)
                       throws ServiceNotKnownException
        Sets the global service for exporting. Not every communication service requires this; mainly the communication services that need to export but do not open a server port require the global service export. These services do not export locally but indirectly via the provided global service export.
        Parameters:
        sfProvider - The provider for a session factory which is to be used for accessing the global service export. Note that the session factory may change and therefore it should not be stored internally.
        clusterName - The name of the cluster this communication service belongs to.
        globRegProvider - The provider for a global registry providing the export service that makes services globally available. The late retrieval of the global registry via provider allows to detect restarts of the global registry requiring re-exporting.
        Throws:
        ServiceNotKnownException - If there are problems retrieving the global registry from the designated provider, a ServiceNotKnownException will be thrown.