public abstract class AbstractEntitySpecResolver extends java.lang.Object implements EntitySpecResolver
| Constructor and Description |
|---|
AbstractEntitySpecResolver(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(java.lang.String type,
BrooklynClassLoadingContext loader) |
java.lang.String |
getName()
Uniquely identifies the resolver, can be used to address the same resolver at a later point in time.
|
abstract EntitySpec<?> |
resolve(java.lang.String type,
BrooklynClassLoadingContext loader,
java.util.Set<java.lang.String> encounteredTypes)
Create a spec for the service type
|
void |
setManagementContext(ManagementContext mgmt)
Sets the
ManagementContext reference. |
public AbstractEntitySpecResolver(java.lang.String name)
public java.lang.String getName()
EntitySpecResolvergetName in interface EntitySpecResolverpublic boolean accepts(java.lang.String type,
BrooklynClassLoadingContext loader)
accepts in interface EntitySpecResolverpublic void setManagementContext(ManagementContext mgmt)
ManagementContextInjectableManagementContext reference.setManagementContext in interface ManagementContextInjectablepublic abstract EntitySpec<?> resolve(java.lang.String type, BrooklynClassLoadingContext loader, java.util.Set<java.lang.String> encounteredTypes)
EntitySpecResolverresolve in interface EntitySpecResolvertype - - the string representation which should be converted to an EntitySpecloader - - use it to load any Java classesencounteredTypes - - 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 CatalogEntitySpecResolver for example usage.EntitySpec corresponding to the passed type argument, possibly pre-configured
based on the information contained in type. Return null value to indicate that
the implementation doesn't know how to convert type to an EntitySpec. Throw an
exception if type looks like a supported value, but can't be loaded.