Class AbstractProtocolEvent
- java.lang.Object
-
- software.amazon.disco.agent.event.AbstractEvent
-
- software.amazon.disco.agent.event.AbstractProtocolEvent
-
- All Implemented Interfaces:
Event,ProtocolEvent
- Direct Known Subclasses:
AbstractProtocolRequestEvent,AbstractProtocolResponseEvent
public abstract class AbstractProtocolEvent extends AbstractEvent implements ProtocolEvent
Base class for protocol events; These events here typically occur around service events and provide the mechanisms that make them work.
-
-
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 AbstractProtocolEvent(java.lang.String origin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetHeaderData(java.lang.String key)Get the value of header information tied to this event.protected java.util.Map<java.lang.String,java.lang.String>getHeaderMap()Get the internal header map.AbstractProtocolEventwithHeaderData(java.lang.String key, java.lang.String value)Stores the key-value pair into the header map.AbstractProtocolEventwithHeaderMap(java.util.Map<java.lang.String,java.lang.String> inputMap)Populate the contents of the inputMap into the header map.-
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
-
-
-
-
Method Detail
-
getHeaderMap
protected java.util.Map<java.lang.String,java.lang.String> getHeaderMap()
Get the internal header map.- Returns:
- the internal header map.
-
withHeaderMap
public AbstractProtocolEvent withHeaderMap(java.util.Map<java.lang.String,java.lang.String> inputMap)
Populate the contents of the inputMap into the header map.- Parameters:
inputMap- the input map to add onto the header map.- Returns:
- the 'this' for method chaining
-
withHeaderData
public AbstractProtocolEvent withHeaderData(java.lang.String key, java.lang.String value)
Stores the key-value pair into the header map.- Parameters:
key- the key used to associate a header mapping.value- The header value associated with the key in the header.- Returns:
- "This" for method chaining.
-
getHeaderData
public java.lang.String getHeaderData(java.lang.String key)
Get the value of header information tied to this event.- Specified by:
getHeaderDatain interfaceProtocolEvent- Parameters:
key- the name of the header- Returns:
- the header value associated with the key.
-
-