Interface ISystemProperties
-
- All Known Implementing Classes:
FedLibSystemProperties
,FedSystemProperties
,SystemProperties
public interface ISystemProperties
This interface provides method to get System configuration information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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(String propertyName, String propertyValue)
Initializes the properties map.void
initializeProperties(Properties properties)
Initializes the properties map.
-
-
-
Method Detail
-
getOrDefault
String getOrDefault(String key, String defaultValue)
Returns system property or the default value if not set.- Parameters:
key
- the system property to retrieve.defaultValue
- the default value if the property is not set.- Returns:
- the property value or the default.
-
getServerList
Collection getServerList() throws Exception
Returns server list.- Returns:
- Server List.
- Throws:
Exception
- if server list cannot be returned.
-
getServiceAllURLs
Collection getServiceAllURLs(String serviceName) throws Exception
Returns server all urls.- Returns:
- Server List.
- Throws:
Exception
- if server list cannot be returned.
-
getServiceURL
URL getServiceURL(String serviceName, String protocol, String hostname, int port, String uri) throws Exception
Returns the URL of the specified service on the specified host.- Parameters:
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.- Returns:
- The URL of the specified service on the specified host.
- Throws:
Exception
- if the URL could not be found.
-
initializeProperties
void initializeProperties(Properties properties)
Initializes the properties map.- Parameters:
properties
- Map of new properties.
-
-