Brooklyn

brooklyn.entity.proxying
[Java] Class InternalPolicyFactory

java.lang.Object
  brooklyn.entity.proxying.InternalPolicyFactory

public class InternalPolicyFactory

Creates policies of required types. This is an internal class for use by core-brooklyn. End-users are strongly discouraged from using this class directly. Note that calling policies by their constructors has not been "deprecated" (yet!). We just support both mechanisms, so one can supply PolicySpec in an EntitySpec.

Authors:
aled


Nested Class Summary
static class InternalPolicyFactory.FactoryConstructionTracker

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

 
Method Summary
java.lang.Object InternalPolicyFactory(ManagementContextInternal managementContext)

java.lang.Object createEnricher(EnricherSpec spec)

java.lang.Object createPolicy(PolicySpec spec)

static boolean isNewStyleEnricher(java.lang.Class clazz)

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

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

static boolean isNewStylePolicy(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

InternalPolicyFactory

public java.lang.Object InternalPolicyFactory(ManagementContextInternal managementContext)


createEnricher

}
public java.lang.Object createEnricher(EnricherSpec spec)


createPolicy

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


isNewStyleEnricher

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


isNewStylePolicy

public static boolean isNewStylePolicy(ManagementContext managementContext, java.lang.Class clazz)
Returns true if this is a "new-style" policy (i.e. where not expected to call the constructor to instantiate it).
Parameters:
managementContext
clazz


isNewStylePolicy

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


 

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