13:01, EEST
July 12, 2022
Hi Team,
I use OPC UA SDK for Java. I would like to enable and disable the communication with the client when the user requests it. Is there a way to stop publishing the server and restart publishing without having to restart UaServer? I tried UaServer.close() but in this case I didn’t come up with a solution unless restarting the Ua Server.
Thanks and regards
15:25, EEST
April 3, 2012
Hi,
Please clarify what you mean, but some assumptions: I’ll take this has nothing to do with OPC UA PubSub (you mentioned “publishing” but also “client”). Thus either you mean stop listening to incoming connections and/or a way to close the socket connection between a client and the server?
IF you instead meant PubSub, you should be able to do PubSubSystem.shutdown without shutting down the UaServer. Though it should be noted that we are aware of some issues regarding PubSub, in some cases you might need to currently make a new PubSubSystem, but the intention anyway would be to just be able to PubSubSystem.start it again.
As to closing a Session from within the server. In short it may be possible (but not tried that I can remember) currently by a lot of subtyping UaServer and related components, but there is no intended public-API to do so . In short you kinda do not do that in OPC UA. Though this has been asked at least once before we do have it somewhere in our very big TODO-list. The one possible use-case could be IF a user is removed completely it might be desired to close the session. But basically in all other cases the clients would just try to immediately open the connection again (and they would do so here as well).
For the stopping listening incoming connections, not really a way, but I’m not 100% sure what you mean. However, it is possible that you would be looking for UaServer.shutdown(int secondsTillShutdown, String shutdownReason, boolean closeServer) and using false for the last parameter. From the javadocs “… * @param closeServer determine whether the server is also closed at the same. Use ‘false’ if you
* intend to restart the server again, by calling {@link #start()}. It will leave the node
* managers intact, and they will not need to be re-initialized. Default is true. …”
If that didn’t help, I would need more clarifications on what you mean?
17:57, EEST
July 12, 2022
Hi,
sorry if my question was a bit confusing. I meant exactly that I needed to stop listening incoming connections, and when restarting the UaServer I wanted to leave the node managers intact. Using UaServer.shutdown and using false for the last parameter as you suggested I’ve got the result I was expecting.
Thanks and regards
Most Users Ever Online: 1919
Currently Online:
9 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 727
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1