Class BaseRegistryUtil

java.lang.Object
org.distributeme.core.util.BaseRegistryUtil
Direct Known Subclasses:
EventServiceRegistryUtil, RegistryUtil

public class BaseRegistryUtil extends Object
Base class for registry utilities.
Version:
$Id: $Id
Author:
lrosenberg
  • Field Details

    • registryLocation

      protected static final RegistryLocation registryLocation
      Location config object.
  • Constructor Details

    • BaseRegistryUtil

      public BaseRegistryUtil()
  • Method Details

    • getRegistryBaseUrl

      protected static String getRegistryBaseUrl(String app)
      Returns the base url of the specified registry application.
      Parameters:
      app - a String object.
      Returns:
      a String object.
    • getRegistryBaseUrl

      protected static String getRegistryBaseUrl(String app, String host, int port, String protocol, String context)

      getRegistryBaseUrl.

      Parameters:
      app - a String object.
      host - a String object.
      port - a int.
      protocol - a String object.
      context - a String object.
      Returns:
      a String object.
    • getUrlContent

      public static byte[] getUrlContent(String url)
      Reads the server reply to an url and returns it as string.
      Parameters:
      url - as string.
      Returns:
      an array of byte.
    • getUrlContent

      protected static byte[] getUrlContent(String url, boolean silently)

      getUrlContent.

      Parameters:
      url - a String object.
      silently - a boolean.
      Returns:
      an array of byte.
    • encode

      public static String encode(String urlPart)
      URLEncodes a string.
      Parameters:
      urlPart - string to encode.
      Returns:
      a String object.
    • getRegistryLocation

      public static RegistryLocation getRegistryLocation()