Class URISchema<T,P>
- java.lang.Object
-
- org.apache.activemq.artemis.utils.uri.URISchema<T,P>
-
public abstract class URISchema<T,P> extends Object
-
-
Constructor Summary
Constructors Constructor Description URISchema()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected URIgetDefaultURI()protected URIFactory<T,P>getFactory()protected StringgetHost(URI uri)protected intgetPort(URI uri)abstract StringgetSchemaName()protected abstract TinternalNewObject(URI uri, Map<String,String> query, P param)protected URIinternalNewURI(T bean)This is the default implementation.protected voidinternalPopulateObject(URI uri, Map<String,String> query, T bean)TnewObject(URI uri, Map<String,String> propertyOverrides, P param)It will create a new Object for the URI selected schema.TnewObject(URI uri, P param)URInewURI(T bean)static Map<String,String>parseQuery(String uri, Map<String,String> propertyOverrides)voidpopulateObject(URI uri, T bean)protected StringprintQuery(Map<String,String> query)
-
-
-
Method Detail
-
getSchemaName
public abstract String getSchemaName()
-
getFactory
protected URIFactory<T,P> getFactory()
-
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 URIpropertyOverrides- 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) throws URISyntaxException
- Throws:
URISyntaxException
-
-