I've questions/clarifications-to-make regarding SI gateway feature:
If my gateway interface is defined as below:
public interface MyGateway{
public void myGatewayMethod(Message<?> inMessage);
}
And my gateway configuration defined as 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-make are :
1) Since the gateway service interface method is returning void, does the Gateway proxy bean still look for a response on the "default-reply-channel" or the user defined "reply-channel" ?
2) In other words, do I still need to mention reply-channel="nullChannel"
(or default-reply-channel="nullChannel"
) ?
OR
since the method return is void, gateway automatically will understand no to listen to the reply channel ?
3) Can I still add reply-timeout
attribute to this configuration OR it will not make sense since there is no reply expected ?
In similar context, if I add another method in the service interface method as below:
public interface MyGateway{
public void myGatewayMethod(Message<?> inMessage);
public Object myGatewayMethod2(Message<?> inMessage);
}
and add this method in my gateway config as 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 would believe I need to define reply-channel
, correct ?
5) The default-reply-channel
may not work for this case as for one method gateway expects a response and not for other, correct ?
6) If yes, then for the method that returns void, do I need to explicitly mention reply-channel="nullChannel"
?
Thanks to confirm.