Page 1 of 1

Basic question about CallableListener

Posted: 25 Jul 2012, 16:02
by jbolmont
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

Re:Basic question about CallableListener

Posted: 26 Jul 2012, 15:22
by Support Team
Hello JB,

Yes, each listener of the MethodManager is called for every method, so it can be written exactly like this.

Best regards
Support Team