Basic question about CallableListener
Posted: 25 Jul 2012, 16:02
Hi all,
I'm beginning with the java SDK and I wonder if it is possible to handle calls to several methods with one CallableListener object, or if it is necessary to have one listener for each method.
For example, can I have something like:
----------------
@Override
public boolean onCall(...) throws StatusException {
if (methodId.equals(Method1.getNodeId())) {
// Do something for method 1
...
} else if(methodId.equals(Method2.getNodeId())) {
// Do something for method 2
...
} else return false;
}
----------------
Thanks for your help !
Best regards,
JB
I'm beginning with the java SDK and I wonder if it is possible to handle calls to several methods with one CallableListener object, or if it is necessary to have one listener for each method.
For example, can I have something like:
----------------
@Override
public boolean onCall(...) throws StatusException {
if (methodId.equals(Method1.getNodeId())) {
// Do something for method 1
...
} else if(methodId.equals(Method2.getNodeId())) {
// Do something for method 2
...
} else return false;
}
----------------
Thanks for your help !
Best regards,
JB