Modifier and Type | Field and Description |
---|---|
static String |
PROP_CONF_LOCATION
System property used to specify of esigate configuration, outside of the classpath.
|
Modifier and Type | Method and Description |
---|---|
static void |
configure()
Loads all instances according to default configuration file.
|
static void |
configure(Properties props)
Loads all instances according to the properties parameter.
|
static void |
configure(String name,
Properties props)
Registers new Driver under provided name with specified properties.
|
static void |
ensureConfigured()
Ensure configuration has been loaded at least once.
|
static URL |
getConfigUrl()
Returns the
URL of the configuration file. |
static Driver |
getInstance()
Retrieves the default instance of this class that is configured according to the properties file
(driver.properties).
|
static Driver |
getInstance(String instanceName)
Retrieves the default instance of this class that is configured according to the properties file
(driver.properties).
|
static Collection<Driver> |
getInstances()
Returns the collection of all
Driver instances. |
static org.apache.http.client.methods.CloseableHttpResponse |
proxy(IncomingRequest incomingRequest)
Selects the Driver instance for this request based on the mappings declared in the configuration and executes it
against the selected
Driver instance. |
static void |
put(String instanceName,
Driver instance)
Add/replace instance in current instance map.
|
public static final String PROP_CONF_LOCATION
public static Collection<Driver> getInstances()
Driver
instances.public static void configure()
public static void configure(Properties props)
props
- properties to use for configurationpublic static void configure(String name, Properties props)
name
- the name of the instanceprops
- the Properties
for the instancepublic static Driver getInstance(String instanceName)
instanceName
- The name of the instance (corresponding to the prefix in the driver.properties file)public static Driver getInstance()
public static void put(String instanceName, Driver instance)
instanceName
- The name of the providerinstance
- The instancepublic static void ensureConfigured()
public static URL getConfigUrl()
URL
of the configuration file.public static org.apache.http.client.methods.CloseableHttpResponse proxy(IncomingRequest incomingRequest) throws IOException, HttpErrorPage
Driver
instance.incomingRequest
- the incoming requestMatchedRequest
containing the Driver
instance and the relative URIHttpErrorPage
- if no instance was found for this request or if an error occursIOException
- if an error occursCopyright © 2008–2018. All rights reserved.