|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mockrunner.connector.InteractionHandler
public class InteractionHandler
This class can be used to add implementations of InteractionImplementor
.
The MockInteraction
delegates the
execute
calls to this class to find a suitable
InteractionImplementor
that can handle the request.
The execute
method of the first InteractionImplementor
that returns true
for InteractionImplementor.canHandle(javax.resource.cci.InteractionSpec, javax.resource.cci.Record, javax.resource.cci.Record)
will
be called.
Constructor Summary | |
---|---|
InteractionHandler()
|
Method Summary | |
---|---|
void |
addImplementor(InteractionImplementor implementor)
Add an implementation of InteractionImplementor , e.g. |
void |
clearImplementors()
Clears the list of current InteractionImplementor objects. |
javax.resource.cci.Record |
execute(javax.resource.cci.InteractionSpec is,
javax.resource.cci.Record request)
Delegator for MockInteraction . |
boolean |
execute(javax.resource.cci.InteractionSpec is,
javax.resource.cci.Record request,
javax.resource.cci.Record response)
Delegator for MockInteraction . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InteractionHandler()
Method Detail |
---|
public void addImplementor(InteractionImplementor implementor)
InteractionImplementor
, e.g.
StreamableRecordByteArrayInteraction
or WSIFInteraction
.
You can add more than one InteractionImplementor
, the first
one that can handle the request will be called.
implementor
- the InteractionImplementor
public void clearImplementors()
InteractionImplementor
objects.
public javax.resource.cci.Record execute(javax.resource.cci.InteractionSpec is, javax.resource.cci.Record request) throws javax.resource.ResourceException
MockInteraction
.
Dispatches the call to the InteractionImplementor
that
returns true
for InteractionImplementor.canHandle(javax.resource.cci.InteractionSpec, javax.resource.cci.Record, javax.resource.cci.Record)
.
javax.resource.ResourceException
public boolean execute(javax.resource.cci.InteractionSpec is, javax.resource.cci.Record request, javax.resource.cci.Record response) throws javax.resource.ResourceException
MockInteraction
.
Dispatches the call to the InteractionImplementor
that
returns true
for InteractionImplementor.canHandle(javax.resource.cci.InteractionSpec, javax.resource.cci.Record, javax.resource.cci.Record)
.
javax.resource.ResourceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |