I have questions / explanations regarding the SI gateway function:
If my gateway interface is defined below:
public interface MyGateway{ public void myGatewayMethod(Message<?> inMessage); }
And my gateway configuration is defined below:
<int:gateway id="mySvcGateway" service-interface="com.myCompany.myPkg.MyGateway" error-channel="globalExceptionHandlerChannel"> <int:method name="myGatewayMethod" request-channel="myGatewayReqChannel" /> </int:gateway>
My questions / clarifications to the following:
1) Since the gateway service interface method returns void, is the bean gateway proxy still looking for the answer to the "default response channel" or the user "response channel"?
2) In other words, is it worth mentioning reply-channel="nullChannel" (or default-reply-channel="nullChannel" )?
OR
since the method return is invalid, the gateway will automatically understand if there is a listening channel for the response?
3) Can I add the reply-timeout attribute to this configuration OR does it not make sense since no response is expected?
In a similar context, if I add another method to the service interface method, as shown below:
public interface MyGateway{ public void myGatewayMethod(Message<?> inMessage); public Object myGatewayMethod2(Message<?> inMessage); }
and add this method to my gateway configuration as shown below:
<int:gateway id="mySvcGateway" service-interface="com.myCompany.myPkg.MyGateway" error-channel="globalExceptionHandlerChannel"> <int:method name="myGatewayMethod" request-channel="myGatewayReqChannel" /> <int:method name="myGatewayMethod2" request-channel="myGatewayReqChannel2" /> </int:gateway>
4) In this case, I believe that I need to define a reply-channel , right?
5) default-reply-channel may not work for this case, since for one method the gateway is waiting for a response, and not for another, right?
6) If yes, then for the method that returns void, do I need to explicitly specify reply-channel="nullChannel" ?
Thanks to confirmation.