Brooklyn

brooklyn.event.adapter
[Java] Class HttpResponseContext

java.lang.Object
  brooklyn.event.adapter.AbstractSensorEvaluationContext
      brooklyn.event.adapter.HttpResponseContext

@Deprecated
public class HttpResponseContext
extends AbstractSensorEvaluationContext

context object for evaluating sensor closures with http data handy

deprecated:
See brooklyn.event.feed.http.HttpFeed


Field Summary
static Logger log

 
Fields inherited from class AbstractSensorEvaluationContext
UNSET, log
 
Constructor Summary
HttpResponseContext(java.net.HttpURLConnection conn)

usual constructor

HttpResponseContext(java.net.HttpURLConnection conn, java.lang.Exception error)

constructor for when there is an error; note that many of the methods on connection will throw errors

HttpResponseContext(java.net.HttpURLConnection conn, int responseCode, java.util.Map headers, java.lang.String content, java.lang.Exception error)

constructor for testing of non-connection usage

 
Method Summary
protected java.lang.Object getDefaultValue()

java.util.Map getHeaders()

http return headers; values are strings in most cases, lists of strings if the original was a list with zero or 2+ values

java.lang.Object getJson()

 
Methods inherited from class AbstractSensorEvaluationContext
evaluate, evaluate, getDefaultValue, propertyMissing
 

Field Detail

log

public static final Logger log


 
Constructor Detail

HttpResponseContext

public HttpResponseContext(java.net.HttpURLConnection conn)
usual constructor
throws:
IOException


HttpResponseContext

public HttpResponseContext(java.net.HttpURLConnection conn, java.lang.Exception error)
constructor for when there is an error; note that many of the methods on connection will throw errors


HttpResponseContext

public HttpResponseContext(java.net.HttpURLConnection conn, int responseCode, java.util.Map headers, java.lang.String content, java.lang.Exception error)
constructor for testing of non-connection usage


 
Method Detail

getDefaultValue

protected java.lang.Object getDefaultValue()


getHeaders

public java.util.Map getHeaders()
http return headers; values are strings in most cases, lists of strings if the original was a list with zero or 2+ values


getJson

public java.lang.Object getJson()


 

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