public interface EntitySpecResolver extends ManagementContextInjectable
entity specificationsbased on the
serviceTypein a template.
The resolver implementation will use the rest of the local part of the service type information
to create and decorate an appropriate
The resolvers are loaded using the
ServiceLoader mechanism, allowing external libraries
to add extra service type implementations that will be picked up at runtime.
|Modifier and Type||Method and Description|
Uniquely identifies the resolver, can be used to address the same resolver at a later point in time.
Create a spec for the service type
boolean accepts(java.lang.String type, BrooklynClassLoadingContext loader)
@Nullable EntitySpec<?> resolve(java.lang.String type, BrooklynClassLoadingContext loader, java.util.Set<java.lang.String> encounteredTypes)
type- - the string representation which should be converted to an EntitySpec
loader- - use it to load any Java classes
encounteredTypes- - an immutable set of the items which are currently being resolved up the stack, used to prevent cycles. Implementations should not try to resolve the type if the symbolicName is already contained in here. When resolving a type add it to a copy of the list before passing the new instance down the stack. See
CatalogEntitySpecResolverfor example usage.
EntitySpeccorresponding to the passed
typeargument, possibly pre-configured based on the information contained in
nullvalue to indicate that the implementation doesn't know how to convert
EntitySpec. Throw an exception if
typelooks like a supported value, but can't be loaded.