Brooklyn

brooklyn.enricher.basic
[Java] Class SensorTransformingEnricher

java.lang.Object
  brooklyn.policy.basic.AbstractEntityAdjunct
      brooklyn.enricher.basic.AbstractEnricher
          brooklyn.enricher.basic.AbstractTypeTransformingEnricher
              brooklyn.enricher.basic.SensorTransformingEnricher

public class SensorTransformingEnricher
extends AbstractTypeTransformingEnricher

Field Summary
 
Fields inherited from class AbstractTypeTransformingEnricher
target
 
Fields inherited from class AbstractEntityAdjunct
_subscriptionTracker, adjunctType, configsInternal, entity, execution, id, leftoverProperties, name
 
Constructor Summary
SensorTransformingEnricher(Entity producer, Sensor source, Sensor target, Function transformation)

SensorTransformingEnricher(Entity producer, Sensor source, Sensor target, groovy.lang.Closure transformation)

SensorTransformingEnricher(Sensor source, Sensor target, Function transformation)

SensorTransformingEnricher(Sensor source, Sensor target, groovy.lang.Closure transformation)

 
Method Summary
protected boolean accept(java.lang.Object value)

protected java.lang.Object compute(java.lang.Object value)

static SensorTransformingEnricher newInstanceTransforming(Entity producer, AttributeSensor source, Function transformation, AttributeSensor target)

creates an enricher which listens to a source (from the producer), transforms it and publishes it under the target

static SensorTransformingEnricher newInstanceTransforming(Entity producer, AttributeSensor sensor, Function transformation)

as newInstanceTransforming(Entity, AttributeSensor, Function, AttributeSensor) using the same sensor as the source and the target

void onEvent(SensorEvent event)

 
Methods inherited from class AbstractTypeTransformingEnricher
setEntity
 
Methods inherited from class AbstractEnricher
getEnricherType
 
Methods inherited from class AbstractEntityAdjunct
check, configure, configure, destroy, doReconfigureConfig, getAdjunctType, getAllConfig, getAllSubscriptions, getConfig, getConfigMap, getId, getManagementContext, getName, getSubscriptionTracker, init, isDestroyed, isLegacyConstruction, isRunning, setConfig, setEntity, setId, setManagementContext, setName, subscribe, subscribeToChildren, subscribeToMembers, toString, unsubscribe, unsubscribe
 

Constructor Detail

SensorTransformingEnricher

public SensorTransformingEnricher(Entity producer, Sensor source, Sensor target, Function transformation)


SensorTransformingEnricher

public SensorTransformingEnricher(Entity producer, Sensor source, Sensor target, groovy.lang.Closure transformation)


SensorTransformingEnricher

public SensorTransformingEnricher(Sensor source, Sensor target, Function transformation)


SensorTransformingEnricher

public SensorTransformingEnricher(Sensor source, Sensor target, groovy.lang.Closure transformation)


 
Method Detail

accept

protected boolean accept(java.lang.Object value)


compute

protected java.lang.Object compute(java.lang.Object value)


newInstanceTransforming

public static SensorTransformingEnricher newInstanceTransforming(Entity producer, AttributeSensor source, Function transformation, AttributeSensor target)
creates an enricher which listens to a source (from the producer), transforms it and publishes it under the target


newInstanceTransforming

public static SensorTransformingEnricher newInstanceTransforming(Entity producer, AttributeSensor sensor, Function transformation)
as newInstanceTransforming(Entity, AttributeSensor, Function, AttributeSensor) using the same sensor as the source and the target


onEvent

@Override
public void onEvent(SensorEvent event)


 

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