public class Traits extends Object
Traits.TraitHeader enum. Trait is an interesting piece of information about a monitored site, such as the name of
the web server implementation that is serving the site, the technology used in the serving application, etc.| Modifier and Type | Class and Description |
|---|---|
static class |
Traits.TraitHeader
The enumeration of HTTP response headers that are considered to bear interesting information about a monitored
site.
|
| Modifier and Type | Method and Description |
|---|---|
static Traits |
collect(org.apache.http.HttpResponse httpResponse,
long timestamp,
InetAddress remoteAddress)
Collects the traits from the given
HttpResponse. |
static Traits |
empty(long timestamp)
Returns a new empty
Traits. |
boolean |
equals(Object obj) |
String |
getPoweredBy() |
InetAddress |
getRemoteAddress() |
long |
getTimestamp() |
int |
hashCode() |
String |
toString() |
public static Traits collect(org.apache.http.HttpResponse httpResponse, long timestamp, InetAddress remoteAddress)
HttpResponse.
Header keys tha occur multiple times, are concantenated into a single comma-separated string in alphabetical order.
httpResponse - the HTTP reponse to collect traits fromtimestamp - the UNIX timestamp when the response was receivedTraitspublic static Traits empty(long timestamp)
Traits.timestamp - the UNIX timestamp when the response was receivedTraits with the given timestamp and no #itemspublic String getPoweredBy()
public InetAddress getRemoteAddress()
nullpublic long getTimestamp()
Traits were collectedpublic boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public String toString()
toString in class ObjectObject.toString()Copyright © 2015–2016 Red Hat. All rights reserved.