Handling Null return value from service activator
hi everyone,
I want to handle the null return value from service activator .Let me elaborate
Below is the snippet of conf
Code:
<int:service-activator id="importFileSA" input-channel="startInterfaceChannel" ref="httpChannel" method="read" output-channel="importFileChannel"></int:service-activator>
<int:router id="importFileRouter" input-channel="importFileChannel" ref="CheckImportFile" method="checkForFile"></int:router>
The method read can either return a Inputstream or a inputstream which is null .
My router code is
Code:
public String checkForFile(Inputstream check)
{
if(check!=null)
{
System.out.println("In router not equal to null");
return "importFileChannel";
}
else
{
System.out.println("In the router ret sta");
return "retriveStatusChangeChannel";
}
}
When the read method return inputstream its fine its calling the method in the router but when it returns a inputstream with null its not calling the router method .Please help