Class ZosmfReaderBuilder<T extends ZosmfReaderBuilder<T>>
java.lang.Object
com.blackhillsoftware.smf.SmfRecordReaderBuilder
com.blackhillsoftware.smf.readerbuilder.ZosmfReaderBuilder<T>
Build a
SmfRecordReader to read SMF data
from z/OSMF using the dataset and files REST API.
Obtain a ZosmfReaderBuilder from
SmfRecordReader.zosmfBuilder(String),
supplying a z/OSMF URL. The URL may take one of the following forms:
https://host:porthttps://host:port/zosmfhttps://host:port/zosmf/restfiles/dshttps://host:port/DATASET.NAMEhttps://host:port/zosmf/DATASET.NAMEhttps://host:port/zosmf/restfiles/ds/DATASET.NAME
https://host:port/zosmf/restfiles/ds/DATASET.NAME.
If the dataset name is not present in the URL it must be supplied using
dataset(String).
Examples:
// Full URL including dataset name
SmfRecordReader reader =
SmfRecordReader.zosmfBuilder("https://zosmf.example.com:10443/zosmf/restfiles/ds/SMF.DATA")
.build();
// Base URL only, dataset specified separately
SmfRecordReader reader =
SmfRecordReader.zosmfBuilder("https://zosmf.example.com:10443")
.dataset("SMF.DATA")
.build();
// Base /zosmf URL, dataset specified separately
SmfRecordReader reader =
SmfRecordReader.zosmfBuilder("https://zosmf.example.com:10443/zosmf")
.dataset("SMF.DATA(ACCOUNT)")
.build();
// URL with dataset name only, REST path added automatically
SmfRecordReader reader =
SmfRecordReader.zosmfBuilder("https://zosmf.example.com:10443/SMF.DATA")
.build();
TLS Certificate Validation
TLS certificates are validated by default. To disable certificate validation e.g. if the name doesn't match or the CA certificate is unavailable, specify theinsecure() option.
Example:
SmfRecordReader reader =
SmfRecordReader.zosmfBuilder("https://zosmf.example.com:10443/zosmf/restfiles/ds/SMF.DATA")
.insecure()
.build();
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build theSmfRecordReader.Specify the dataset name to read.include(int smfType) Include a SMF record type - seeSmfRecordReader.include(int)include(int smfType, int subtype) Include a SMF record type and subtype - seeSmfRecordReader.include(int, int)insecure()Disable validation of https certificates for this reader (not secure)
-
Constructor Details
-
ZosmfReaderBuilder
-
-
Method Details
-
insecure
Disable validation of https certificates for this reader (not secure)- Returns:
- this ZosmfReaderBuilder
-
dataset
Specify the dataset name to read.The dataset name must not contain a slash and should be specified in standard z/OS format, for example
DATASET.NAMEorDATASET.NAME(MEMBER)for a PDS/PDSE member.- Parameters:
datasetName- the dataset name- Returns:
- this ZosmfReaderBuilder
-
include
Description copied from class:SmfRecordReaderBuilderInclude a SMF record type - seeSmfRecordReader.include(int)- Specified by:
includein classSmfRecordReaderBuilder- Parameters:
smfType- the SMF type to include- Returns:
- this SmfRecordReaderBuilder to allow method chaining
-
include
Description copied from class:SmfRecordReaderBuilderInclude a SMF record type and subtype - seeSmfRecordReader.include(int, int)- Specified by:
includein classSmfRecordReaderBuilder- Parameters:
smfType- the SMF type to includesubtype- the SMF subtype to include- Returns:
- this SmfRecordReaderBuilder to allow method chaining
-
build
Description copied from class:SmfRecordReaderBuilderBuild theSmfRecordReader. Consider calling this method in a try-with-resources statement to ensure the SmfRecordReader is closed.- Specified by:
buildin classSmfRecordReaderBuilder- Returns:
- the resulting SmfRecordReader
- Throws:
IOException- if an I/O error occurs
-