Scenario
To configure data, there are two options:
- extract and configure data programmatically
- configure previously extracted data
Note: If you have more than one data path, use this syntax:
.withSpdPaths(Paths.get({spdDirectory1}), Paths.get(spdDirectory2))
Extract and configure data programmatically
Use spdDataSource
to programmatically configure *.spd data.
AddressingConfiguration configuration = new AddressingConfigurationBuilder()
.withData(new SpdDataSourceBuilder()
.withNumberOfExtractors(3) // number of CPU to use when using extraction
.withSpdPaths(Paths.get("/data"), Paths.get("/data2/some.spd")) // location for *.spd
.withExtractedPath(Paths.get("/data-extract-location"))
.build())
.withResources(Paths.get("{ggs.home directory}/ggs-dist-{version}/resources")) // runtime resource
.build();
Configure previously extracted data
Use fileDataSource
to programmatically configure extracted data.
Addressing addressing;
public VerifyAddress() throws AddressingException {
addressing = new AddressingBuilder()
.withConfiguration(new AddressingConfigurationBuilder()
.withData(new FileDataSource(Paths.get("{pathTo}\\extracteddata")))
.withResources(Paths.get("{ggs.home directory}/ggs-dist-{version}/resources"))
.build())
.build();
}