The main entry point for the Global Routing API is described by the IGRAInstance, which is implemented by the GRAInstanceImpl class.
GRAInstanceImpl class can be instantiated by providing an object of either of the following two classes:
- File: The File object created with the path to the routing.properties file.
- Options: The Options class where you can specify all of the same parameters as the File object, however define them inline.
Field Name | Type | Description |
---|---|---|
dbConfigJSON | File | File object with the path of the database configuration JSON file |
The Options class has the ability to specify the same optional parameters as defined in the routing.properties file. Descriptions for these properties can be found in Configuring Routing Properties and Data Resources.
You can instantiate the GRAInstanceImpl using one of the following ways:
IGRAInstance gra = IGRAInstanceFactory.getInstance(PROPERTY_FILE_OBJECT);
Where PROPERTY_FILE_OBJECT is the File object containing all the necessary configuration and location of dbList.json file containing database resources information.
or
IGRAInstance gra = IGRAInstanceFactory.getInstance(dbConfigJSON, options);
Where dbConfigJSON is the JSON file containing database resources information and options is the instance of Options class containing values for optional parameters.
IGRAInstance gra = IGRAInstanceFactory.getInstance(resourcesConfiguration, options);
Where resourcesConfiguration is the instance of DBResourcesConfiguration class containing database resources information and options is the instance of Options class containing values for optional parameters.
Once you get an instance of IGRAInstance, the routing capabilities methods can then be called.