public abstract class AbstractServiceResponseEvent extends AbstractServiceEvent implements ServiceResponseEvent
ServiceEvent.Typedata, origin| Constructor and Description |
|---|
AbstractServiceResponseEvent(java.lang.String origin,
java.lang.String service,
java.lang.String operation,
ServiceRequestEvent requestEvent)
Construct a new AbstractServiceResponseEvent
|
| Modifier and Type | Method and Description |
|---|---|
ServiceRequestEvent |
getRequest()
Get the associated request event
|
java.lang.Object |
getResponse()
Get the response object
|
java.lang.Throwable |
getThrown()
Get the thrown exception
|
AbstractServiceResponseEvent |
withResponse(java.lang.Object response)
Add a response object to this event
|
AbstractServiceResponseEvent |
withThrown(java.lang.Throwable thrown)
Add a thrown exception to this event
|
getOperation, getService, getServiceEventId, getTypegetData, getOrigin, withDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOperation, getService, getServiceEventId, getTypepublic AbstractServiceResponseEvent(java.lang.String origin,
java.lang.String service,
java.lang.String operation,
ServiceRequestEvent requestEvent)
origin - the origin of the eventservice - the service name e.g. 'WeatherService'operation - the operation name e.g. 'getWeather'requestEvent - the associated request eventpublic AbstractServiceResponseEvent withResponse(java.lang.Object response)
response - the response objectpublic AbstractServiceResponseEvent withThrown(java.lang.Throwable thrown)
thrown - the thrown exceptionpublic ServiceRequestEvent getRequest()
getRequest in interface ServiceResponseEventpublic java.lang.Object getResponse()
getResponse in interface ServiceResponseEventpublic java.lang.Throwable getThrown()
getThrown in interface ServiceResponseEvent