Package csw.config.api
Class ConfigData$
java.lang.Object
csw.config.api.ConfigData$
Provides various alternatives for constructing the data to be stored in the config service.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ConfigData$
Static reference to the singleton instance of this Scala object. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAn internally used method to create that take an akka source and length of data and creates a ConfigData instance out of itfromBytes
(byte[] bytes) Create ConfigData from byte arrayCreate ConfigData from file pathfromString
(String str) Create ConfigData from string
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
ConfigData$
public ConfigData$()
-
-
Method Details
-
fromString
Create ConfigData from string- Parameters:
str
- the string which needs to be converted to ConfigData- Returns:
- the ConfigData created from the given string
-
fromPath
Create ConfigData from file path- Parameters:
path
- the path which needs to be converted to ConfigData- Returns:
- the ConfigData created from the given path
-
fromBytes
Create ConfigData from byte array- Parameters:
bytes
- an array of bytes that is converted to ConfigData- Returns:
- the ConfigData created from the given array of bytes
-
from
public ConfigData from(akka.stream.scaladsl.Source<akka.util.ByteString, Object> dataBytes, long length) An internally used method to create that take an akka source and length of data and creates a ConfigData instance out of it- Parameters:
dataBytes
- an akka source that materializes to stream of byteslength
- the length representing number of bytes- Returns:
- the ConfigData instance created out of provided dataBytes and length
-