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
Basic question about CallableListener
Moderator: uasdkjava
- Support Team
- Hero Member
- Posts: 3072
- Joined: 18 Mar 2011, 15:09
Re:Basic question about CallableListener
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
Yes, each listener of the MethodManager is called for every method, so it can be written exactly like this.
Best regards
Support Team
Best regards
Unified Automation Support Team
Unified Automation Support Team