public class HttpServletNetworkResponseEvent extends AbstractNetworkProtocolResponseEvent implements HttpNetworkProtocolResponseEvent
NetworkProtocolEvent.NetworkTypeProtocolEvent.Typedata, origin| Constructor and Description |
|---|
HttpServletNetworkResponseEvent(java.lang.String origin,
HttpNetworkProtocolRequestEvent requestEvent) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getAllHeaders()
Returns all headers
|
java.lang.String |
getFirstHeader(java.lang.String key)
Returns the first header value that matches the provided key if it exists
|
java.util.List<java.lang.String> |
getHeaders(java.lang.String key)
Returns the header values that matches the provided key if it exists
|
HttpNetworkProtocolRequestEvent |
getHttpRequestEvent()
Get the HTTP Request event that came before this response event.
|
NetworkProtocolEvent.NetworkType |
getNetworkType()
Get the network type of this ProtocolNetworkEvent
|
int |
getStatusCode()
The HTTP status code
|
HttpServletNetworkResponseEvent |
withHeaderMap(java.util.Map<java.lang.String,java.lang.String> inputMap)
Store all the contents of inputMap into the header map.
|
HttpServletNetworkResponseEvent |
withResponse(java.lang.Object response)
Store the response object associated with this http response.
|
HttpServletNetworkResponseEvent |
withStatusCode(int statusCode)
Store the status code that resulted from the HTTP response.
|
getNetworkRequestEvent, getTypegetProtocolRequestEvent, getResponse, getStatusIndicator, withStatusIndicatorgetHeaderData, getHeaderMap, withHeaderDatagetData, getOrigin, withDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNetworkRequestEventgetProtocolRequestEvent, getResponse, getStatusIndicatorgetHeaderData, getTypepublic HttpServletNetworkResponseEvent(java.lang.String origin,
HttpNetworkProtocolRequestEvent requestEvent)
public HttpServletNetworkResponseEvent withHeaderMap(java.util.Map<java.lang.String,java.lang.String> inputMap)
withHeaderMap in class AbstractProtocolEventinputMap - the source header map.public HttpServletNetworkResponseEvent withStatusCode(int statusCode)
statusCode - the status codepublic HttpServletNetworkResponseEvent withResponse(java.lang.Object response)
withResponse in class AbstractProtocolResponseEventresponse - the response objectpublic int getStatusCode()
getStatusCode in interface HttpNetworkProtocolResponseEventpublic HttpNetworkProtocolRequestEvent getHttpRequestEvent()
getHttpRequestEvent in interface HttpNetworkProtocolResponseEventpublic NetworkProtocolEvent.NetworkType getNetworkType()
getNetworkType in interface NetworkProtocolEventpublic java.lang.String getFirstHeader(java.lang.String key)
getFirstHeader in interface BaseHeaderRetrievablekey - - key of the headers to retrievepublic java.util.List<java.lang.String> getHeaders(java.lang.String key)
getHeaders in interface BaseHeaderRetrievablekey - - key of the headers to retrievepublic java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAllHeaders()
getAllHeaders in interface BaseHeaderRetrievable