|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.entity.proxying.EntitySpec
public class EntitySpec
Gives details of an entity to be created. It describes the entity's configuration, and is reusable to create multiple entities with the same configuration. To create an EntitySpec, it is strongly encouraged to use create(Class) etc. Users who need to implement this are strongly encouraged to extend EntitySpec.
- The type of entity to be createdConstructor Summary | |
EntitySpec(java.lang.Class type)
|
Method Summary | |
---|---|
EntitySpec
|
addInitializer(EntityInitializer initializer)
|
EntitySpec
|
addInitializer(java.lang.Class initializerType)
The supplied class must have a public no-arg constructor. |
EntitySpec
|
addInitializers(java.util.Collection initializer)
|
EntitySpec
|
additionalInterfaces(java.lang.Class... vals)
|
EntitySpec
|
additionalInterfaces(java.lang.Iterable val)
|
EntitySpec
|
configure(java.util.Map val)
|
EntitySpec
|
configure(java.lang.CharSequence key, java.lang.Object val)
|
EntitySpec
|
configure(ConfigKey key, java.lang.Object val)
|
EntitySpec
|
configure(ConfigKey key, Task val)
|
EntitySpec
|
configure(HasConfigKey key, java.lang.Object val)
|
EntitySpec
|
configure(HasConfigKey key, Task val)
|
static EntitySpec
|
create(java.lang.Class type)
Creates a new EntitySpec instance for an entity of the given type. |
static EntitySpec
|
create(java.lang.Class type, java.lang.Class implType)
Creates a new EntitySpec instance for an entity of the given type. |
static EntitySpec
|
create(java.util.Map config, java.lang.Class type)
Creates a new EntitySpec instance with the given config, for an entity of the given type. |
static EntitySpec
|
create(EntitySpec spec)
Wraps an entity spec so its configuration can be overridden without modifying the original entity spec. |
EntitySpec
|
displayName(java.lang.String val)
|
EntitySpec
|
enricher(Enricher val)
adds a policy to the spec |
EntitySpec
|
enricher(EnricherSpec val)
adds a policy to the spec |
EntitySpec
|
enricherSpecs(java.lang.Iterable val)
adds the supplied policies to the spec |
EntitySpec
|
enrichers(java.lang.Iterable val)
adds the supplied policies to the spec |
java.util.Set
|
getAdditionalInterfaces()
@return Additional interfaces (other than just getType()) that this entity implements; important for when accessing entity through a proxy to determine which interfaces the proxy exposes. |
java.util.Map
|
getConfig()
@return Read-only configuration values |
java.lang.String
|
getDisplayName()
@return The display name of the entity |
java.util.List
|
getEnricherSpecs()
|
java.util.List
|
getEnrichers()
|
java.util.Map
|
getFlags()
@return Read-only construction flags |
java.lang.Class
|
getImplementation()
@return The implementation of the entity; if not null. this overrides any defaults or other configuration |
java.util.List
|
getInitializers()
@return EntityInitializer objects which customize the entity to be created |
Entity
|
getParent()
@return The entity's parent |
java.util.List
|
getPolicies()
|
java.util.List
|
getPolicySpecs()
|
java.lang.Class
|
getType()
@return The type of the entity |
EntitySpec
|
immutable()
"seals" this spec, preventing any future changes |
EntitySpec
|
impl(java.lang.Class val)
|
static EntitySpec
|
newInstance(java.lang.Class type)
|
EntitySpec
|
parent(Entity val)
|
EntitySpec
|
policies(java.lang.Iterable val)
adds the supplied policies to the spec |
EntitySpec
|
policy(Policy val)
adds a policy to the spec |
EntitySpec
|
policy(PolicySpec val)
adds a policy to the spec |
EntitySpec
|
policySpecs(java.lang.Iterable val)
adds the supplied policies to the spec |
java.lang.String
|
toString()
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Constructor Detail |
---|
public EntitySpec(java.lang.Class type)
Method Detail |
---|
public EntitySpec addInitializer(EntityInitializer initializer)
public EntitySpec addInitializer(java.lang.Class initializerType)
public EntitySpec addInitializers(java.util.Collection initializer)
public EntitySpec additionalInterfaces(java.lang.Class... vals)
public EntitySpec additionalInterfaces(java.lang.Iterable val)
public EntitySpec configure(java.util.Map val)
public EntitySpec configure(java.lang.CharSequence key, java.lang.Object val)
public EntitySpec configure(ConfigKey key, java.lang.Object val)
public EntitySpec configure(ConfigKey key, Task val)
public EntitySpec configure(HasConfigKey key, java.lang.Object val)
public EntitySpec configure(HasConfigKey key, Task val)
public static EntitySpec create(java.lang.Class type)
type
- An Entity interface
public static EntitySpec create(java.lang.Class type, java.lang.Class implType)
type
- An Entity interfaceimplType
- An Entity implementation, which implements the type interface
public static EntitySpec create(java.util.Map config, java.lang.Class type)
config
- The spec's configuration (see EntitySpec#configure(Map)#configure(Map)).type
- An Entity interface
public static EntitySpec create(EntitySpec spec)
public EntitySpec displayName(java.lang.String val)
public EntitySpec enricher(Enricher val)
public EntitySpec enricher(EnricherSpec val)
public EntitySpec enricherSpecs(java.lang.Iterable val)
public EntitySpec enrichers(java.lang.Iterable val)
public java.util.Set getAdditionalInterfaces()
public java.util.Map getConfig()
public java.lang.String getDisplayName()
public java.util.List getEnricherSpecs()
public java.util.List getEnrichers()
public java.util.Map getFlags()
@Nullable public java.lang.Class getImplementation()
public java.util.List getInitializers()
public Entity getParent()
public java.util.List getPolicies()
public java.util.List getPolicySpecs()
public java.lang.Class getType()
public EntitySpec immutable()
public EntitySpec impl(java.lang.Class val)
public static EntitySpec newInstance(java.lang.Class type)
public EntitySpec parent(Entity val)
public EntitySpec policies(java.lang.Iterable val)
public EntitySpec policy(Policy val)
public EntitySpec policy(PolicySpec val)
public EntitySpec policySpecs(java.lang.Iterable val)
@Override public java.lang.String toString()
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.