Class HttpJsonCloudPlugin

  • All Implemented Interfaces:
    se.arkalix.plugin.Plugin

    public class HttpJsonCloudPlugin
    extends java.lang.Object
    implements se.arkalix.plugin.Plugin
    HTTP/JSON cloud plugin.

    This class helps one system to join a local cloud by communicating with the mandatory Arrowhead core services of that cloud using HTTP and JSON. More precisely, it (1) registers and unregisters the services provided by its system, (2) retrieves the public key required to validate consumer tokens, as well as (3) helps resolve service consumption queries.

    Note that the plugin currently assumes that the service registry, authorization system public key and orchestrator of the cloud in question will never change. It also never adds the service discovery or orchestration services to the service caches of the systems using them, making them inaccessible via the ArSystem.consume() method.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      se.arkalix.util.concurrent.Future<se.arkalix.plugin.PluginAttached> attachTo​(se.arkalix.ArSystem system, java.util.Map<java.lang.Class<? extends se.arkalix.plugin.Plugin>,​se.arkalix.plugin.PluginFacade> dependencies)  
      static HttpJsonCloudPlugin joinViaServiceRegistryAt​(java.net.InetSocketAddress socketAddress)
      Creates new HTTP/JSON cloud plugin that tries to make its systems join a certain local cloud via the service registry system available at the specified socketAddress.
      int ordinal()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface se.arkalix.plugin.Plugin

        dependencies
    • Method Detail

      • joinViaServiceRegistryAt

        public static HttpJsonCloudPlugin joinViaServiceRegistryAt​(java.net.InetSocketAddress socketAddress)
        Creates new HTTP/JSON cloud plugin that tries to make its systems join a certain local cloud via the service registry system available at the specified socketAddress.

        If more control over the behavior of the core integrator is desired, please use the builder class instead.

        Parameters:
        socketAddress - IP address or hostname and port of service registry system to use for entering local cloud.
        Returns:
        New core integrator.
      • ordinal

        public int ordinal()
        Specified by:
        ordinal in interface se.arkalix.plugin.Plugin
      • attachTo

        public se.arkalix.util.concurrent.Future<se.arkalix.plugin.PluginAttached> attachTo​(se.arkalix.ArSystem system,
                                                                                            java.util.Map<java.lang.Class<? extends se.arkalix.plugin.Plugin>,​se.arkalix.plugin.PluginFacade> dependencies)
        Specified by:
        attachTo in interface se.arkalix.plugin.Plugin