Class EventServiceRegistryUtil

java.lang.Object
org.distributeme.core.util.BaseRegistryUtil
org.distributeme.core.util.EventServiceRegistryUtil

public class EventServiceRegistryUtil extends BaseRegistryUtil
Utility classes for requests to the registry via http.
Version:
$Id: $Id
Author:
lrosenberg
  • Field Details

  • Constructor Details

    • EventServiceRegistryUtil

      public EventServiceRegistryUtil()
  • Method Details

    • list2string

      public static final String list2string(List<ServiceDescriptor> descriptors)
      Converts a list of service descriptors to a string.
      Parameters:
      descriptors - a List object.
      Returns:
      a String object.
    • string2list

      public static final List<ServiceDescriptor> string2list(String encodedString)
      Converts a list of string representations of service descriptors to a list of ServiceDescriptor objects.
      Parameters:
      encodedString - a String object.
      Returns:
      a List object.
    • registerAtRegistryAs

      protected static final List<ServiceDescriptor> registerAtRegistryAs(String channelName, org.distributeme.core.util.EventServiceRegistryUtil.Target as, ServiceDescriptor descriptor)

      registerAtRegistryAs.

      Parameters:
      channelName - a String object.
      as - a EventServiceRegistryUtil.Target object.
      descriptor - a ServiceDescriptor object.
      Returns:
      a List object.
    • registerConsumerAtRegistryAndGetSuppliers

      public static final List<ServiceDescriptor> registerConsumerAtRegistryAndGetSuppliers(String channelName, ServiceDescriptor myConsumer)

      registerConsumerAtRegistryAndGetSuppliers.

      Parameters:
      channelName - a String object.
      myConsumer - a ServiceDescriptor object.
      Returns:
      a List object.
    • registerSupplierAtRegistryAndGetConsumers

      public static final List<ServiceDescriptor> registerSupplierAtRegistryAndGetConsumers(String channelName, ServiceDescriptor mySupplier)

      registerSupplierAtRegistryAndGetConsumers.

      Parameters:
      channelName - a String object.
      mySupplier - a ServiceDescriptor object.
      Returns:
      a List object.
    • notifyConsumerNotAvailable

      public static final void notifyConsumerNotAvailable(ServiceDescriptor consumer)

      notifyConsumerNotAvailable.

      Parameters:
      consumer - a ServiceDescriptor object.
    • notifySupplierNotAvailable

      public static final void notifySupplierNotAvailable(ServiceDescriptor supplier)

      notifySupplierNotAvailable.

      Parameters:
      supplier - a ServiceDescriptor object.
    • notifyNotAvailable

      public static final void notifyNotAvailable(org.distributeme.core.util.EventServiceRegistryUtil.Target as, ServiceDescriptor descriptor)
      Offers a possibility to mark a descriptor as unavailable.
      Parameters:
      as - the type of descriptor, supplier or consumer.
      descriptor - a ServiceDescriptor object.
    • getRegistryBaseUrl

      protected static String getRegistryBaseUrl()
      Returns the base url for this registry application. Globally configured host and port are used.
      Returns:
      a String object.
    • getRegistryBaseUrl

      protected static String getRegistryBaseUrl(Location location)
      Returns the base url for this registry application.
      Parameters:
      location - a Location object.
      Returns:
      a String object.