Class AbstractProtocolResponseEvent
- java.lang.Object
-
- software.amazon.disco.agent.event.AbstractEvent
-
- software.amazon.disco.agent.event.AbstractProtocolEvent
-
- software.amazon.disco.agent.event.AbstractProtocolResponseEvent
-
- All Implemented Interfaces:
Event,ProtocolEvent,ProtocolResponseEvent
- Direct Known Subclasses:
AbstractNetworkProtocolResponseEvent
public abstract class AbstractProtocolResponseEvent extends AbstractProtocolEvent implements ProtocolResponseEvent
This event stores information about the resultant outcome of the requested invocation.
-
-
Nested Class Summary
-
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 AbstractProtocolResponseEvent(java.lang.String origin, ProtocolRequestEvent requestEvent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProtocolRequestEventgetProtocolRequestEvent()java.lang.ObjectgetResponse()Get the protocol-level response objectjava.lang.StringgetStatusIndicator()Returns the status indicator of this response event.AbstractProtocolResponseEventwithResponse(java.lang.Object response)Add the response object into this protocol event.AbstractProtocolResponseEventwithStatusIndicator(java.lang.String statusIndicator)Add the status indicator into this event.-
Methods inherited from class software.amazon.disco.agent.event.AbstractProtocolEvent
getHeaderData, getHeaderMap, withHeaderData, withHeaderMap
-
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.ProtocolEvent
getType
-
-
-
-
Constructor Detail
-
AbstractProtocolResponseEvent
public AbstractProtocolResponseEvent(java.lang.String origin, ProtocolRequestEvent requestEvent)
-
-
Method Detail
-
withResponse
public AbstractProtocolResponseEvent withResponse(java.lang.Object response)
Add the response object into this protocol event.- Parameters:
response- The response object associated with this event.- Returns:
- "This" for the method chaining.
-
withStatusIndicator
public AbstractProtocolResponseEvent withStatusIndicator(java.lang.String statusIndicator)
Add the status indicator into this event.- Parameters:
statusIndicator- The string status indicator.- Returns:
- "This" for the method chaining.
-
getProtocolRequestEvent
public ProtocolRequestEvent getProtocolRequestEvent()
- Specified by:
getProtocolRequestEventin interfaceProtocolResponseEvent
-
getResponse
public java.lang.Object getResponse()
Get the protocol-level response object- Specified by:
getResponsein interfaceProtocolResponseEvent- Returns:
- the request object
-
getStatusIndicator
public java.lang.String getStatusIndicator()
Returns the status indicator of this response event.- Specified by:
getStatusIndicatorin interfaceProtocolResponseEvent- Returns:
- String representation of the status indicator
-
-