Brooklyn

brooklyn.entity.proxying
[Java] Class EntitySpecs

java.lang.Object
  brooklyn.entity.proxying.EntitySpecs

public class EntitySpecs

For creating EntitySpec instances.

Authors:
aled


Method Summary
static BasicEntitySpec appSpec(java.lang.Class type)

Creates a new EntitySpec for this application type.

static BasicEntitySpec spec(java.lang.Class type)

Creates a new EntitySpec instance for an entity of the given type.

static BasicEntitySpec spec(java.lang.Class type, java.lang.Class implType)

Creates a new EntitySpec instance for an entity of the given type.

static BasicEntitySpec spec(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 WrappingEntitySpec wrapSpec(EntitySpec spec)

Wraps an entity spec so its configuration can be overridden without modifying the original entity spec.

 
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()
 

Method Detail

appSpec

@SuppressWarnings("unchecked")
public static BasicEntitySpec appSpec(java.lang.Class type)
Creates a new EntitySpec for this application type. If the type is an interface, then the returned spec will use the normal logic of looking for ImplementedBy etc. However, if the type is a class then the that implementation will be used directly. When an entity is created using the EntitySpec, one will get back a proxy of type StartableApplication, but the proxy will also implement all the other interfaces that the given type class implements.


spec

public static BasicEntitySpec spec(java.lang.Class type)
Creates a new EntitySpec instance for an entity of the given type. The returned BasicEntitySpec can then be customized.
Parameters:
type - An Entity interface


spec

public static BasicEntitySpec spec(java.lang.Class type, java.lang.Class implType)
Creates a new EntitySpec instance for an entity of the given type. The returned BasicEntitySpec can then be customized.
Parameters:
type - An Entity interface
implType - An Entity implementation, which implements the type interface


spec

public static BasicEntitySpec spec(java.util.Map config, java.lang.Class type)
Creates a new EntitySpec instance with the given config, for an entity of the given type. This is primarily for groovy code; equivalent to EntitySpecs.spec(type).configure(config).
Parameters:
config - The spec's configuration (see BasicEntitySpec#configure(Map)#configure(Map)).
type - An Entity interface


wrapSpec

public static WrappingEntitySpec wrapSpec(EntitySpec spec)
Wraps an entity spec so its configuration can be overridden without modifying the original entity spec.


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.