|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectbrooklyn.event.adapter.AbstractSensorEvaluationContext
brooklyn.event.adapter.HttpResponseContext
class HttpResponseContext extends AbstractSensorEvaluationContext
context object for evaluating sensor closures with http data handy
Field Summary | |
---|---|
static Logger |
log
|
Fields inherited from class AbstractSensorEvaluationContext | |
---|---|
UNSET, log |
Property Summary | |
---|---|
java.net.HttpURLConnection |
connection
may be null during testing |
java.lang.String |
content
may be null if no content available |
java.util.Map |
headerLists
http return headers, where all values are lists (as per HttpConnection) see "headers" for direct access to non-list headers |
int |
responseCode
http result code, or -1 if error is set |
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 |
---|
public static final Logger log
Property Detail |
---|
@Nullable final java.net.HttpURLConnection connection
@Nullable final java.lang.String content
final java.util.Map headerLists
final int responseCode
Constructor Detail |
---|
HttpResponseContext(java.net.HttpURLConnection conn)
HttpResponseContext(java.net.HttpURLConnection conn, java.lang.Exception error)
HttpResponseContext(java.net.HttpURLConnection conn, int responseCode, java.util.Map headers, java.lang.String content, java.lang.Exception error)
Method Detail |
---|
protected java.lang.Object getDefaultValue()
java.util.Map getHeaders()
java.lang.Object getJson()
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.