|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InteractionImplementor
Implementations of this interface can be addded to InteractionHandler
.
When one of the two execute
methods of MockInteraction
are called, the InteractionHandler
iterates through the implementors
and dispatches the execute
call to the first one which returns
true
for canHandle(javax.resource.cci.InteractionSpec, javax.resource.cci.Record, javax.resource.cci.Record)
.
There are several implementations of this interface, e.g.
StreamableRecordByteArrayInteraction
,
WSIFInteraction
,
IndexedRecordInteraction
,
MappedRecordInteraction
.
Of course, you can also implement your own version and it may be necessary
in many situations.
Method Summary | |
---|---|
boolean |
canHandle(javax.resource.cci.InteractionSpec interactionSpec,
javax.resource.cci.Record actualRequest,
javax.resource.cci.Record actualResponse)
Implementors should return true if this implementor can handle the request. |
javax.resource.cci.Record |
execute(javax.resource.cci.InteractionSpec interactionSpec,
javax.resource.cci.Record actualRequest)
First version of the Interaction.execute methods. |
boolean |
execute(javax.resource.cci.InteractionSpec interactionSpec,
javax.resource.cci.Record actualRequest,
javax.resource.cci.Record actualResponse)
Second version of the Interaction.execute methods. |
Method Detail |
---|
boolean canHandle(javax.resource.cci.InteractionSpec interactionSpec, javax.resource.cci.Record actualRequest, javax.resource.cci.Record actualResponse)
true
if this implementor can handle the request.
Please note that for calls to execute(InteractionSpec, Record)
,
the second Record
parameter is null
.
interactionSpec
- the InteractionSpec
for the actual callactualRequest
- the request for the actual callactualResponse
- the response for the actual call, may be null
true
if this implementor will handle the request and
will return the specified response, false
otherwisejavax.resource.cci.Record execute(javax.resource.cci.InteractionSpec interactionSpec, javax.resource.cci.Record actualRequest) throws javax.resource.ResourceException
Interaction.execute
methods.
interactionSpec
- the interaction specactualRequest
- the actual request
javax.resource.ResourceException
boolean execute(javax.resource.cci.InteractionSpec interactionSpec, javax.resource.cci.Record actualRequest, javax.resource.cci.Record actualResponse) throws javax.resource.ResourceException
Interaction.execute
methods.
interactionSpec
- the interaction specactualRequest
- the actual requestactualResponse
- the actual response
true
under normal conditions
javax.resource.ResourceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |