public final class Config extends Object
Only some constants are made public from this class
Modifier and Type | Field and Description |
---|---|
static String |
API_VERSION
The version of this API build being used; this is NOT the version of the Schedules Direct service feed
|
static String |
DEFAULT_BASE_URL
The default URL for contacting the Schedules Direct JSON data feed server
|
Modifier and Type | Method and Description |
---|---|
boolean |
captureHttpComm()
When true, the api will capture and write all HTTP communication with
the JSON service to a log file.
|
boolean |
captureHttpContent()
When true, the api will capture the content of all HTTP communication
with the JSON service.
|
boolean |
captureJsonEncodingErrors()
When true, the api will capture and write all JSON encoding errors it
encounters to disk; useful for debugging and bug reporting.
|
boolean |
captureJsonParseErrors()
When true, the api will capture and write all JSON parsing errors it
encounters to disk; useful for debugging and bug reporting.
|
File |
captureRoot()
Specifies the root directory that all capture logs are written to.
|
static Config |
get()
Obtain the singleton instance of the Config class
|
SimpleDateFormat |
getDateTimeFormat()
Get a SimpleDateFormat instance for the configured date/time format string
|
String |
getDateTimeFormatString()
Return the expected format string for all date/time values in the upstream JSON
|
public static final String API_VERSION
public static final String DEFAULT_BASE_URL
public static Config get()
public String getDateTimeFormatString()
public SimpleDateFormat getDateTimeFormat()
This cannot be overridden at runtime.
public boolean captureJsonParseErrors()
When true, the api will capture and write all JSON parsing errors it encounters to disk; useful for debugging and bug reporting.
Default is false, to enable set the JVM system property:
sdjson.capture.json-errors
public boolean captureJsonEncodingErrors()
When true, the api will capture and write all JSON encoding errors it encounters to disk; useful for debugging and bug reporting.
Default is false, to enable set the JVM system property:
sdjson.capture.encode-errors
public File captureRoot()
Specifies the root directory that all capture logs are written to.
Default is ${user.home}/.sdjson/capture
; can be overriden via system property:
sdjson.fs.capture=/path/to/root/dir
public boolean captureHttpComm()
When true, the api will capture and write all HTTP communication with the JSON service to a log file.
Default is false, to enable set the JVM system property:
sdjson.capture.http
public boolean captureHttpContent()
When true, the api will capture the content of all HTTP communication
with the JSON service. This setting only has an affect if
captureHttpComm() == true
.
Default is false, to enable set the JVM system property:
sdjson.capture.http.content
Copyright © 2012–2014 Battams, Derek. All rights reserved.