Class AbstractServiceCancellationEvent
- java.lang.Object
-
- software.amazon.disco.agent.event.AbstractEvent
-
- software.amazon.disco.agent.event.AbstractServiceEvent
-
- software.amazon.disco.agent.event.AbstractServiceCancellationEvent
-
- All Implemented Interfaces:
CancellationEvent,Event,ServiceCancellationEvent,ServiceEvent
- Direct Known Subclasses:
ServiceDownstreamCancellationEvent
public abstract class AbstractServiceCancellationEvent extends AbstractServiceEvent implements ServiceCancellationEvent
An event issued to the event bus when service request is cancelled
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface software.amazon.disco.agent.event.ServiceEvent
ServiceEvent.Type
-
-
Field Summary
-
Fields inherited from class software.amazon.disco.agent.event.AbstractEvent
data, origin
-
-
Constructor Summary
Constructors Constructor Description AbstractServiceCancellationEvent(java.lang.String origin, java.lang.String service, java.lang.String operation, ServiceRequestEvent requestEvent)Constructor for a AbstractServiceCancellationEvent
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceRequestEventgetRequest()Get the associated request eventAbstractServiceCancellationEventwithRequest(ServiceRequestEvent request)Add a request object to this event-
Methods inherited from class software.amazon.disco.agent.event.AbstractServiceEvent
getOperation, getService, getType
-
Methods inherited from class software.amazon.disco.agent.event.AbstractEvent
getData, getOrigin, withData
-
-
-
-
Constructor Detail
-
AbstractServiceCancellationEvent
public AbstractServiceCancellationEvent(java.lang.String origin, java.lang.String service, java.lang.String operation, ServiceRequestEvent requestEvent)Constructor for a AbstractServiceCancellationEvent- Parameters:
origin- the origin of this event e.g. 'Web' or 'gRPC'service- the service name e.g. WeatherServiceoperation- the operation name e.g getWeatherrequestEvent- the associated cancelled request Event
-
-
Method Detail
-
withRequest
public AbstractServiceCancellationEvent withRequest(ServiceRequestEvent request)
Add a request object to this event- Parameters:
request- the downstream service request object- Returns:
- the 'this' for method chaining
-
getRequest
public ServiceRequestEvent getRequest()
Get the associated request event- Specified by:
getRequestin interfaceServiceCancellationEvent- Returns:
- the service request event which is cancelled
ServiceRequestEvent
-
-