public class SystemProperties extends Object implements ISystemProperties
amserver
to the shared library.
Mainly to provide system configuration information.Constructor and Description |
---|
SystemProperties()
Creates a new instance of
SystemProperties |
Modifier and Type | Method and Description |
---|---|
String |
get(String key)
Returns system properties.
|
String |
getOrDefault(String key,
String defaultValue)
Returns system property or the default value if not set.
|
Collection |
getServerList()
Returns server list.
|
Collection |
getServiceAllURLs(String serviceName)
Returns server all urls.
|
URL |
getServiceURL(String serviceName,
String protocol,
String hostname,
int port,
String uri)
Returns the URL of the specified service on the specified host.
|
void |
initializeProperties(Properties properties)
Initializes the properties map.
|
void |
initializeProperties(String propertyName,
String propertyValue)
Initializes the properties map.
|
public SystemProperties()
SystemProperties
public String get(String key)
get
in interface ISystemProperties
key
- Key to the properties.public String getOrDefault(String key, String defaultValue)
ISystemProperties
getOrDefault
in interface ISystemProperties
key
- the system property to retrieve.defaultValue
- the default value if the property is not set.public Collection getServerList() throws Exception
getServerList
in interface ISystemProperties
Exception
- if server list cannot be returned.public Collection getServiceAllURLs(String serviceName) throws Exception
getServiceAllURLs
in interface ISystemProperties
Exception
- if server list cannot be returned.public URL getServiceURL(String serviceName, String protocol, String hostname, int port, String uri) throws Exception
getServiceURL
in interface ISystemProperties
serviceName
- The name of the service.protocol
- The service protocol.hostname
- The service host name.port
- The service listening port.uri
- The service deployment URI.Exception
- if the URL could not be found.public void initializeProperties(Properties properties)
initializeProperties
in interface ISystemProperties
properties
- Map of new properties.public void initializeProperties(String propertyName, String propertyValue)
initializeProperties
in interface ISystemProperties
propertyName
- Name of properties.propertyValue
- Value of properties.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.