Top Description Fields Constructors Methods
org.postgresql.jdbcurlresolver

public Class PgServiceConfParser

extends Object
Class Inheritance
Imports
org.postgresql.PGEnvironment, .PGProperty, org.postgresql.util.OSUtil, .PGPropertyUtil, org.checkerframework.checker.nullness.qual.Nullable, java.io.BufferedReader, .File, .FileInputStream, .IOException, .InputStream, .InputStreamReader, .Reader, java.net.MalformedURLException, .URL, java.nio.charset.StandardCharsets, java.util.Arrays, .Properties, .Set, java.util.logging.Level, .Logger, java.util.stream.Collectors

helps to read Connection Service File. https://www.postgresql.org/docs/current/libpq-pgservice.html

Field Summary

Modifier and TypeField and Description
private boolean
private static final Logger
private final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private @Nullable String
private @Nullable Properties
public static @Nullable Properties

Returns:

key value pairs
getServiceProperties
(String
service name to search for
serviceName
)

Read pg_service.conf resource

private InputStream
openInputStream(String resourceName)

private @Nullable Properties
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ignoreIfOpenFailsback to summary
private boolean ignoreIfOpenFails
LOGGERback to summary
private static final Logger LOGGER
serviceNameback to summary
private final String serviceName

Constructor Detail

PgServiceConfParserback to summary
private PgServiceConfParser(String serviceName)

Method Detail

findPgServiceConfResourceNameback to summary
private @Nullable String findPgServiceConfResourceName()
findServiceDescriptionback to summary
private @Nullable Properties findServiceDescription()
getServicePropertiesback to summary
public static @Nullable Properties getServiceProperties(String serviceName)

Read pg_service.conf resource

Parameters
serviceName:String

service name to search for

Returns:@Nullable Properties

key value pairs

openInputStreamback to summary
private InputStream openInputStream(String resourceName) throws IOException
parseInputStreamback to summary
private @Nullable Properties parseInputStream(InputStream inputStream) throws IOException