Here the interface is documented.
I have been looking for the Javadoc online but could find none.
It is in C:\Oracle1\Middleware\jdeveloper\soa\modules\oracle.soa.mediator_11.1.1\mediator.jar
Voila a Java callback naked and crude:
import java.util.logging.Logger;
import oracle.tip.mediator.common.api.CalloutMediatorMessage;
import oracle.tip.mediator.metadata.CaseType;
public class MyClass implements oracle.tip.mediator.common.api.IJavaCallout {
public void initialize(Logger logger) {
}
public boolean preRouting(CalloutMediatorMessage calloutMediatorMessage) {
return false;
}
public boolean preRoutingRule(CaseType caseType, CalloutMediatorMessage calloutMediatorMessage) {
return false;
}
public boolean postRoutingRule(CaseType caseType, CalloutMediatorMessage calloutMediatorMessage, CalloutMediatorMessage calloutMediatorMessage1, Throwable throwable) {
return false;
}
public boolean postRouting(CalloutMediatorMessage calloutMediatorMessage, CalloutMediatorMessage calloutMediatorMessage1, Throwable throwable) {
return false;
}
public boolean preCallbackRouting(CalloutMediatorMessage calloutMediatorMessage) {
return false;
}
public boolean postCallbackRouting(CalloutMediatorMessage calloutMediatorMessage, Throwable throwable) {
return false;
}
}
To be noticed that the postRouting/postRoutingRule have 2 parameters, one is the request and the other the response (I guess!)
Callback has a single parameter because there is no way to remember the request to which this callback is the response.... at least not in Mediator.
Here a good Hello World tutorial on the subject.
No comments:
Post a Comment