Package org.rapidcontext.core.type
Class Environment
java.lang.Object
org.rapidcontext.core.storage.StorableObject
org.rapidcontext.core.type.Environment
An external connectivity environment. The environment contains a
list of adapter connection pool, each with their own set of
configuration parameter values.
- Version:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The dictionary key for the environment connection path.static final String
The dictionary key for the environment description.static final Path
The environment object storage path.Fields inherited from class org.rapidcontext.core.storage.StorableObject
dict, KEY_ACTIVATED_TIME, KEY_CLASSNAME, KEY_ID, KEY_TYPE, PREFIX_COMPUTED, PREFIX_HIDDEN
-
Constructor Summary
ConstructorsConstructorDescriptionEnvironment
(String id, String type, Dict dict) Creates a new environment from a serialized representation. -
Method Summary
Modifier and TypeMethodDescriptionstatic Stream
<Environment> Returns a stream of all environments found in the storage.Returns the default connection path for this environment.Returns the environment description.static Environment
Searches for a specific environment in the storage.findConnection
(Storage storage, String id) Searches for a connection with the specified id.Methods inherited from class org.rapidcontext.core.storage.StorableObject
activate, activatedTime, destroy, id, init, isActive, isModified, passivate, path, serialize, sterilize, toString, type
-
Field Details
-
KEY_DESCRIPTION
The dictionary key for the environment description.- See Also:
-
KEY_CONNECTIONS
The dictionary key for the environment connection path. The value stored will be a path object.- See Also:
-
PATH
The environment object storage path.
-
-
Constructor Details
-
Environment
Creates a new environment from a serialized representation.- Parameters:
id
- the object identifiertype
- the object type namedict
- the serialized representation
-
-
Method Details
-
all
Returns a stream of all environments found in the storage.- Parameters:
storage
- the storage to search- Returns:
- a stream of environment instances found
-
find
Searches for a specific environment in the storage.- Parameters:
storage
- the storage to search inid
- the environment identifier- Returns:
- the environment found, or null if not found
-
description
Returns the environment description.- Returns:
- the environment description.
-
connectionPath
Returns the default connection path for this environment.- Returns:
- the default connection path for this environment
-
findConnection
Searches for a connection with the specified id.- Parameters:
storage
- the storage to search inid
- the connection id to search for- Returns:
- the connection found, or null if not found
-