Class ConsulRegistryConnector

  • All Implemented Interfaces:
    org.distributeme.core.RegistryConnector

    public class ConsulRegistryConnector
    extends java.lang.Object
    implements org.distributeme.core.RegistryConnector
    Connector to use consul service registry with distributeme framework. Consul support is configurable via distributeme.json To activate consul instead of distributeme default registry: "registryConnectorClazz": "org.distributeme.consulintegration.ConsulRegistryConnector" To configure the location of consul: "registryContainerPort": 8500 "registryContainerHost": "localhost" "registryContainerProtocol" : "http" To configure java system properties as optional tags for consul (comma separated list): "systemPropertiesToTags": "com.sun.management.jmxremote.port,java.vm.version,configureme.defaultEnvironment,java.version", Created by rboehling on 2/28/17.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean bind​(org.distributeme.core.ServiceDescriptor service)  
      java.lang.String describeRegistry()  
      boolean notifyBind​(org.distributeme.core.Location location, org.distributeme.core.ServiceDescriptor descriptor)  
      boolean notifyUnbind​(org.distributeme.core.Location location, org.distributeme.core.ServiceDescriptor descriptor)  
      org.distributeme.core.ServiceDescriptor resolve​(org.distributeme.core.ServiceDescriptor toResolve, org.distributeme.core.Location loc)  
      void setCustomTagProviderClassList​(java.util.List<java.lang.String> customTagProviderClassList)  
      void setTagableSystemProperties​(java.util.Map<java.lang.String,​java.lang.String> tagableSystemProperties)  
      boolean unbind​(org.distributeme.core.ServiceDescriptor service)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConsulRegistryConnector

        public ConsulRegistryConnector()
    • Method Detail

      • describeRegistry

        public java.lang.String describeRegistry()
        Specified by:
        describeRegistry in interface org.distributeme.core.RegistryConnector
      • bind

        public boolean bind​(org.distributeme.core.ServiceDescriptor service)
        Specified by:
        bind in interface org.distributeme.core.RegistryConnector
      • unbind

        public boolean unbind​(org.distributeme.core.ServiceDescriptor service)
        Specified by:
        unbind in interface org.distributeme.core.RegistryConnector
      • resolve

        public org.distributeme.core.ServiceDescriptor resolve​(org.distributeme.core.ServiceDescriptor toResolve,
                                                               org.distributeme.core.Location loc)
        Specified by:
        resolve in interface org.distributeme.core.RegistryConnector
      • setTagableSystemProperties

        public void setTagableSystemProperties​(java.util.Map<java.lang.String,​java.lang.String> tagableSystemProperties)
        Specified by:
        setTagableSystemProperties in interface org.distributeme.core.RegistryConnector
      • setCustomTagProviderClassList

        public void setCustomTagProviderClassList​(java.util.List<java.lang.String> customTagProviderClassList)
        Specified by:
        setCustomTagProviderClassList in interface org.distributeme.core.RegistryConnector
      • notifyBind

        public boolean notifyBind​(org.distributeme.core.Location location,
                                  org.distributeme.core.ServiceDescriptor descriptor)
        Specified by:
        notifyBind in interface org.distributeme.core.RegistryConnector
      • notifyUnbind

        public boolean notifyUnbind​(org.distributeme.core.Location location,
                                    org.distributeme.core.ServiceDescriptor descriptor)
        Specified by:
        notifyUnbind in interface org.distributeme.core.RegistryConnector