Class PropertiesBasedSettings
- java.lang.Object
-
- io.github.shsmysore.fcmjava.client.settings.PropertiesBasedSettings
-
- All Implemented Interfaces:
IFcmClientSettings
public class PropertiesBasedSettings extends Object implements IFcmClientSettings
Initializes Client Settings from Properties.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PropertiesBasedSettingscreateFromDefault()Creates the Settings from the default location.static PropertiesBasedSettingscreateFromFile(Path path, Charset charset)Reads the Properties from a given location.static PropertiesBasedSettingscreateFromProperties(Properties properties)Reads the properties from a Properties object.static PropertiesBasedSettingscreateFromSystemProperties()Reads the Properties from the System Properties.StringgetApiKey()StringgetFcmUrl()
-
-
-
Method Detail
-
getFcmUrl
public String getFcmUrl()
- Specified by:
getFcmUrlin interfaceIFcmClientSettings
-
getApiKey
public String getApiKey()
- Specified by:
getApiKeyin interfaceIFcmClientSettings
-
createFromDefault
public static PropertiesBasedSettings createFromDefault()
Creates the Settings from the default location.- Returns:
- Initialized Client Settings
-
createFromFile
public static PropertiesBasedSettings createFromFile(Path path, Charset charset)
Reads the Properties from a given location.- Parameters:
path- Path of the Properties filecharset- Charset of the Properties firle- Returns:
- Initialized Client Settings
-
createFromSystemProperties
public static PropertiesBasedSettings createFromSystemProperties()
Reads the Properties from the System Properties.- Returns:
- Initialized Client Settings
-
createFromProperties
public static PropertiesBasedSettings createFromProperties(Properties properties)
Reads the properties from a Properties object.- Parameters:
properties- Properties instance- Returns:
- Initialized Client Settings
-
-