Class URISchema<T,P>

java.lang.Object
org.apache.activemq.artemis.utils.uri.URISchema<T,P>
Direct Known Subclasses:
AbstractCFSchema, AbstractServerLocatorSchema, AbstractTransportConfigurationSchema, ClusterConnectionStaticSchema

public abstract class URISchema<T,P> extends Object
  • Constructor Details

    • URISchema

      public URISchema()
  • Method Details

    • getSchemaName

      public abstract String getSchemaName()
    • newObject

      public T newObject(URI uri, P param) throws Exception
      Throws:
      Exception
    • populateObject

      public void populateObject(URI uri, T bean) throws Exception
      Throws:
      Exception
    • newURI

      public URI newURI(T bean) throws Exception
      Throws:
      Exception
    • getFactory

      protected URIFactory<T,P> getFactory()
    • getHost

      protected String getHost(URI uri)
    • getDefaultURI

      protected URI getDefaultURI()
    • getPort

      protected int getPort(URI uri)
    • newObject

      public T newObject(URI uri, Map<String,String> propertyOverrides, P param) throws Exception
      It will create a new Object for the URI selected schema. the propertyOverrides is used to replace whatever was defined on the URL string
      Parameters:
      uri - The URI
      propertyOverrides - used to replace whatever was defined on the URL string
      Returns:
      new Object
      Throws:
      Exception - On error
    • internalNewObject

      protected abstract T internalNewObject(URI uri, Map<String,String> query, P param) throws Exception
      Throws:
      Exception
    • internalNewURI

      protected URI internalNewURI(T bean) throws Exception
      This is the default implementation. Sub classes are should provide a proper implementation for their schemas.
      Throws:
      Exception
    • internalPopulateObject

      protected void internalPopulateObject(URI uri, Map<String,String> query, T bean) throws Exception
      Throws:
      Exception
    • parseQuery

      public static Map<String,String> parseQuery(String uri, Map<String,String> propertyOverrides)
    • printQuery

      protected String printQuery(Map<String,String> query)