public interface RuntimeEnv
| Modifier and Type | Interface and Description |
|---|---|
static class |
RuntimeEnv.Builder
The builder which is used to generate a RuntimeEnv instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(String name)
Whether a field is contained.
|
static RuntimeEnv |
deserialize(String serializedRuntimeEnv)
Deserialize the runtime env from string.
|
<T> T |
get(String name,
Class<T> classOfT)
Get the object of a runtime env field.
|
RuntimeEnvConfig |
getConfig()
Get runtime env config.
|
String |
getJsonStr(String name)
Get the json string of a runtime env field.
|
boolean |
isEmpty()
Whether the runtime env is empty.
|
boolean |
remove(String name)
Remove a runtime env field by name.
|
String |
serialize()
Serialize the runtime env to string.
|
String |
serializeToRuntimeEnvInfo()
Serialize the runtime env to string of RuntimeEnvInfo.
|
void |
set(String name,
Object value)
Set a runtime env field by name and Object.
|
void |
setConfig(RuntimeEnvConfig runtimeEnvConfig)
Set runtime env config.
|
void |
setJsonStr(String name,
String jsonStr)
Set a runtime env field by name and json string.
|
void set(String name, Object value) throws RuntimeEnvException
name - The build-in names or a runtime env plugin name.value - An object with primitive data type or plain old java object(POJO).RuntimeEnvExceptionRuntimeEnvNamevoid setJsonStr(String name, String jsonStr) throws RuntimeEnvException
name - The build-in names or a runtime env plugin name.jsonStr - A json string represents the runtime env field.RuntimeEnvExceptionRuntimeEnvName<T> T get(String name, Class<T> classOfT) throws RuntimeEnvException
T - A primitive data type or plain old java object(POJO) type.name - The build-in names or a runtime env plugin name.classOfT - The class of a primitive data type or plain old java object(POJO) type.RuntimeEnvExceptionString getJsonStr(String name) throws RuntimeEnvException
name - The build-in names or a runtime env plugin name.RuntimeEnvExceptionboolean contains(String name)
name - The runtime env plugin name.boolean remove(String name) throws RuntimeEnvException
name - The build-in names or a runtime env plugin name.RuntimeEnvExceptionString serialize() throws RuntimeEnvException
RuntimeEnvExceptionboolean isEmpty()
String serializeToRuntimeEnvInfo() throws RuntimeEnvException
RuntimeEnvExceptionstatic RuntimeEnv deserialize(String serializedRuntimeEnv) throws RuntimeEnvException
serializedRuntimeEnv - The serialized runtime env string.RuntimeEnvExceptionvoid setConfig(RuntimeEnvConfig runtimeEnvConfig)
runtimeEnvConfig - RuntimeEnvConfig getConfig()
Copyright © 2023. All rights reserved.