Brooklyn

brooklyn.entity.proxying
[Java] Class InternalEntityFactory

java.lang.Object
  brooklyn.entity.proxying.InternalEntityFactory

public class InternalEntityFactory

Creates entities (and proxies) of required types, given the This is an internal class for use by core-brooklyn. End-users are strongly discouraged from using this class directly.

Authors:
aled


Nested Class Summary
static class InternalEntityFactory.FactoryConstructionTracker

For tracking if AbstractEntity constructor has been called by framework, or in legacy way (i.e. directly).

 
Method Summary
java.lang.Object InternalEntityFactory(ManagementContextInternal managementContext, EntityTypeRegistry entityTypeRegistry)

java.lang.Object createEntity(EntitySpec spec)

java.lang.Object createEntityProxy(EntitySpec spec, java.lang.Object entity)

static boolean isNewStyleEntity(ManagementContext managementContext, java.lang.Class clazz)

Returns true if this is a "new-style" entity (i.e. where not expected to call the constructor to instantiate it).

static boolean isNewStyleEntity(java.lang.Class clazz)

 
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

InternalEntityFactory

public java.lang.Object InternalEntityFactory(ManagementContextInternal managementContext, EntityTypeRegistry entityTypeRegistry)


createEntity

@SuppressWarnings({ "unchecked", "rawtypes" })
public java.lang.Object createEntity(EntitySpec spec)


createEntityProxy

@SuppressWarnings("unchecked")
public java.lang.Object createEntityProxy(EntitySpec spec, java.lang.Object entity)


isNewStyleEntity

public static boolean isNewStyleEntity(ManagementContext managementContext, java.lang.Class clazz)
Returns true if this is a "new-style" entity (i.e. where not expected to call the constructor to instantiate it). That means it is an entity with a no-arg constructor, and where there is a mapped for an entity type interface.
Parameters:
managementContext
clazz
Returns:


isNewStyleEntity

public static boolean isNewStyleEntity(java.lang.Class clazz)


 

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