Brooklyn

brooklyn.enricher
[Java] Class HttpLatencyDetector

java.lang.Object
  brooklyn.policy.basic.AbstractEntityAdjunct
      brooklyn.enricher.basic.AbstractEnricher
          brooklyn.enricher.HttpLatencyDetector

public class HttpLatencyDetector
extends AbstractEnricher

An Enricher which computes latency in accessing a URL. See comments on the methods in the static builder() this exposes.

This is currently tested against relatively simple GET requests, optionally returned from sensors. It does not currently support POST and has limited support for https.


Nested Class Summary
static class HttpLatencyDetector.Builder

 
Field Summary
static groovy.time.TimeDuration LATENCY_WINDOW_DEFAULT_PERIOD

static AttributeSensor REQUEST_LATENCY_IN_SECONDS_IN_WINDOW

static AttributeSensor REQUEST_LATENCY_IN_SECONDS_MOST_RECENT

 
Fields inherited from class AbstractEnricher
leftoverProperties
 
Fields inherited from class AbstractEntityAdjunct
_subscriptionTracker, entity, id, name
 
Constructor Summary
protected HttpLatencyDetector(HttpLatencyDetector.Builder builder)

 
Method Summary
protected void activateAdditionalEnrichers(EntityLocal entity)

static HttpLatencyDetector.Builder builder()

protected boolean computeEnablement()

void destroy()

protected void initialize()

void setEntity(EntityLocal entity)

protected void startSubscriptions(EntityLocal entity)

void updateEnablement()

refreshes whether the latency detection feed should be enabled, based on e.g. service up, the URL sensor, etc

 
Methods inherited from class AbstractEnricher
configure
 
Methods inherited from class AbstractEntityAdjunct
check, destroy, getAllSubscriptions, getId, getManagementContext, getName, getSubscriptionTracker, isDestroyed, isRunning, setEntity, setId, setName, subscribe, subscribeToChildren, subscribeToMembers, unsubscribe, unsubscribe
 

Field Detail

LATENCY_WINDOW_DEFAULT_PERIOD

public static final groovy.time.TimeDuration LATENCY_WINDOW_DEFAULT_PERIOD


REQUEST_LATENCY_IN_SECONDS_IN_WINDOW

public static final AttributeSensor REQUEST_LATENCY_IN_SECONDS_IN_WINDOW


REQUEST_LATENCY_IN_SECONDS_MOST_RECENT

public static final AttributeSensor REQUEST_LATENCY_IN_SECONDS_MOST_RECENT


 
Constructor Detail

HttpLatencyDetector

protected HttpLatencyDetector(HttpLatencyDetector.Builder builder)


 
Method Detail

activateAdditionalEnrichers

protected void activateAdditionalEnrichers(EntityLocal entity)


builder

public static HttpLatencyDetector.Builder builder()


computeEnablement

protected boolean computeEnablement()


destroy

@Override
public void destroy()


initialize

protected void initialize()


setEntity

@Override
public void setEntity(EntityLocal entity)


startSubscriptions

protected void startSubscriptions(EntityLocal entity)


updateEnablement

public void updateEnablement()
refreshes whether the latency detection feed should be enabled, based on e.g. service up, the URL sensor, etc


 

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