public static interface DeclarationSession.Builder
DeclarationSession.| Modifier and Type | Method and Description |
|---|---|
DeclarationSession |
build()
Builds the
DeclarationSession. |
DeclarationSession.Builder |
withCacheStorage(CacheStorage cacheStorage)
Sets an implementation of a
CacheStorage that will be used by the DeclarationSession to store and cache
resolved values and types. |
DeclarationSession.Builder |
withConfigurationElementDeclarations(List<org.mule.runtime.app.declaration.api.ConfigurationElementDeclaration> configurationElementDeclarations)
Sets the
ConfigurationElementDeclarer that represents the configuration and connection (optional) that would be
used to resolve the services. |
DeclarationSession.Builder |
withDependency(Dependency dependency)
Sets a
Dependency to the session. |
DeclarationSession.Builder |
withGlobalParameters(List<org.mule.runtime.app.declaration.api.TopLevelParameterDeclaration> globalParameterDeclarations)
SDK supports to defined top level elements only so for those cases where a parameter for the configuration declaration has
to reference a parameter of this type the declaration of the global parameter has to be passed here.
|
DeclarationSession.Builder |
withSessionProperties(Map<String,String> sessionProperties)
Sets the
Map of properties for the session. |
DeclarationSession.Builder withConfigurationElementDeclarations(List<org.mule.runtime.app.declaration.api.ConfigurationElementDeclaration> configurationElementDeclarations)
ConfigurationElementDeclarer that represents the configuration and connection (optional) that would be
used to resolve the services.
There could be more than one for cases like HTTP and OAuth or WebSockets where more than one configuration is required as one depends on the other. Take into account that these configurations would be created and if one of them fails to be created it won't allow you to operate over this session. The only case in which more than one configuration is defined should be cases like mentioned before.
A configuration is optional as there may be cases in which a connector provides values without a configuration, connection required.
configurationElementDeclarations - ConfigurationElementDeclarer.DeclarationSession.Builder withGlobalParameters(List<org.mule.runtime.app.declaration.api.TopLevelParameterDeclaration> globalParameterDeclarations)
Whenever possible use inline declaration of parameters.
globalParameterDeclarations - TopLevelParameterDeclaration.DeclarationSession.Builder withSessionProperties(Map<String,String> sessionProperties)
Map of properties for the session. They would be used to resolve properties placeholder on declaration
provided to this session.sessionProperties - Map.DeclarationSession.Builder withDependency(Dependency dependency)
Dependency to the session. It should be used to define the connectors that would be part of the session. If
a declaration element is defined for a connector the connector dependency has to be provided here with the correct GAV,
type and classifier.
SharedRuntimeLibraries would be provided also here as a dependency to the session.
The dependency definition supports system scope, systemPath and exclusions. Whenever systemPath is used it has to be
considered how the ToolingRuntimeClient has been configured as if the
AgentConfiguration has been set to a different server rather than
the one the client is running it won't be able to access the same file system. Exclusions are support exactly in the same
way as mule-maven-packager supports it.
dependency - Dependency.DeclarationSession.Builder withCacheStorage(CacheStorage cacheStorage)
CacheStorage that will be used by the DeclarationSession to store and cache
resolved values and types.cacheStorage - a CacheStorage used by an internal cache to store computed results and types.DeclarationSession.BuilderDeclarationSession build()
DeclarationSession.DeclarationSession.Copyright © 2025 MuleSoft, Inc.. All rights reserved.