Class HttpServletNetworkResponseEvent
- java.lang.Object
-
- software.amazon.disco.agent.event.AbstractEvent
-
- software.amazon.disco.agent.event.AbstractProtocolEvent
-
- software.amazon.disco.agent.event.AbstractProtocolResponseEvent
-
- software.amazon.disco.agent.event.AbstractNetworkProtocolResponseEvent
-
- software.amazon.disco.agent.event.HttpServletNetworkResponseEvent
-
- All Implemented Interfaces:
Event,HttpNetworkProtocolResponseEvent,NetworkProtocolEvent,NetworkProtocolResponseEvent,ProtocolEvent,ProtocolResponseEvent
public class HttpServletNetworkResponseEvent extends AbstractNetworkProtocolResponseEvent implements HttpNetworkProtocolResponseEvent
A concrete implementation of the HttpNetworkProtocolResponseEvent to express after an HTTP Servlet has been intercepted. This event occurs after the request has been served.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface software.amazon.disco.agent.event.NetworkProtocolEvent
NetworkProtocolEvent.NetworkType
-
Nested classes/interfaces inherited from interface software.amazon.disco.agent.event.ProtocolEvent
ProtocolEvent.Type
-
-
Field Summary
-
Fields inherited from class software.amazon.disco.agent.event.AbstractEvent
data, origin
-
-
Constructor Summary
Constructors Constructor Description HttpServletNetworkResponseEvent(java.lang.String origin, HttpNetworkProtocolRequestEvent requestEvent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpNetworkProtocolRequestEventgetHttpRequestEvent()Get the HTTP Request event that came before this response event.NetworkProtocolEvent.NetworkTypegetNetworkType()Get the network type of this ProtocolNetworkEventintgetStatusCode()The HTTP status codeHttpServletNetworkResponseEventwithHeaderMap(java.util.Map<java.lang.String,java.lang.String> inputMap)Store all the contents of inputMap into the header map.HttpServletNetworkResponseEventwithResponse(java.lang.Object response)Store the response object associated with this http response.HttpServletNetworkResponseEventwithStatusCode(int statusCode)Store the status code that resulted from the HTTP response.-
Methods inherited from class software.amazon.disco.agent.event.AbstractNetworkProtocolResponseEvent
getNetworkRequestEvent, getType
-
Methods inherited from class software.amazon.disco.agent.event.AbstractProtocolResponseEvent
getProtocolRequestEvent, getResponse, getStatusIndicator, withStatusIndicator
-
Methods inherited from class software.amazon.disco.agent.event.AbstractProtocolEvent
getHeaderData, getHeaderMap, withHeaderData
-
Methods inherited from class software.amazon.disco.agent.event.AbstractEvent
getData, getOrigin, withData
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.disco.agent.event.NetworkProtocolResponseEvent
getNetworkRequestEvent
-
Methods inherited from interface software.amazon.disco.agent.event.ProtocolEvent
getHeaderData, getType
-
Methods inherited from interface software.amazon.disco.agent.event.ProtocolResponseEvent
getProtocolRequestEvent, getResponse, getStatusIndicator
-
-
-
-
Constructor Detail
-
HttpServletNetworkResponseEvent
public HttpServletNetworkResponseEvent(java.lang.String origin, HttpNetworkProtocolRequestEvent requestEvent)
-
-
Method Detail
-
withHeaderMap
public HttpServletNetworkResponseEvent withHeaderMap(java.util.Map<java.lang.String,java.lang.String> inputMap)
Store all the contents of inputMap into the header map.- Overrides:
withHeaderMapin classAbstractProtocolEvent- Parameters:
inputMap- the source header map.- Returns:
- "This" for method chaining.
-
withStatusCode
public HttpServletNetworkResponseEvent withStatusCode(int statusCode)
Store the status code that resulted from the HTTP response.- Parameters:
statusCode- the status code- Returns:
- "This" for method chaining.
-
withResponse
public HttpServletNetworkResponseEvent withResponse(java.lang.Object response)
Store the response object associated with this http response.- Overrides:
withResponsein classAbstractProtocolResponseEvent- Parameters:
response- the response object- Returns:
- "This" for method chaining.
-
getStatusCode
public int getStatusCode()
The HTTP status code- Specified by:
getStatusCodein interfaceHttpNetworkProtocolResponseEvent- Returns:
- The http status code of the response.
-
getHttpRequestEvent
public HttpNetworkProtocolRequestEvent getHttpRequestEvent()
Get the HTTP Request event that came before this response event.- Specified by:
getHttpRequestEventin interfaceHttpNetworkProtocolResponseEvent- Returns:
- The HTTP Request event that occurred before this response event.
-
getNetworkType
public NetworkProtocolEvent.NetworkType getNetworkType()
Get the network type of this ProtocolNetworkEvent- Specified by:
getNetworkTypein interfaceNetworkProtocolEvent- Returns:
- return either TCP or UDP.
-
-