public interface ConsumerExtensionAccessor
addRequestExtension(Class, Object) to add extensions to
the request before it is sent to the producer. Use getResponseExtensionsFrom(Class) to retrieve the
extensions that the producer might have sent back in its response.| Modifier and Type | Method and Description |
|---|---|
void |
addRequestExtension(Class targetClass,
Object extension)
Adds an extension before it is sent to the producer to elements of the specified target class.
|
void |
addResponseExtension(Class responseClass,
UnmarshalledExtension extension)
Adds the specified unmarshalled extension to be linked to the specified WSRP response class.
|
void |
clear()
Clears the currently held extensions.
|
List<Extension> |
getRequestExtensionsFor(Class targetClass)
Retrieves previously set extensions targeted at the specified WSRP 2 target class so that the consumer can add
them to the requests before sending them to the producer.
|
List<UnmarshalledExtension> |
getResponseExtensionsFrom(Class responseClass)
Retrieves extensions that were sent by the producer for instances of the specified response class.
|
List<Extension> getRequestExtensionsFor(Class targetClass)
targetClass - the WSRP 2 class for which extensions are supposed to be retrieved, if anyvoid addRequestExtension(Class targetClass, Object extension)
InteractionParams, EventParams, MarkupParams or ResourceParamstargetClass - the class of elements on which extensions need to be added before being sent to the producerextension - the extension to be added in the form of a Element (strongly recommended) or a Serializable objectList<UnmarshalledExtension> getResponseExtensionsFrom(Class responseClass)
MarkupResponse,
BlockingInteractionResponse, HandleEventsResponse or ResourceResponse. These classes are the ones that contain the specific information pertaining
to markup, interaction, resource or event responses.responseClass - the WSRP 2 response class for which extensions are to be retrieved.void addResponseExtension(Class responseClass, UnmarshalledExtension extension)
responseClass - the WSRP response class (among those currently supported) to which extracted and unmarshalled extensions need to be addedextension - the extracted and unmarshalled extension to addvoid clear()
Copyright © 2006-2014 GateIn. All Rights Reserved.