com.prosysopc.ua.client
Class ServerList
java.lang.Object
com.prosysopc.ua.client.ServerListBase
com.prosysopc.ua.client.ServerList
public class ServerList
- extends ServerListBase
List of discovered OPC server URLs.
Use discover to connect to a discovery server and add servers from that to the list.
Use getServers to read the list.
|
Constructor Summary |
ServerList()
Create a new empty list of servers. |
ServerList(String uri)
Create a new list of servers, containing the servers discovered from a discoveryServer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServerList
public ServerList()
- Create a new empty list of servers. Call discover to fill the list.
ServerList
public ServerList(String uri)
throws ServerListException
- Create a new list of servers, containing the servers discovered from a discoveryServer.
- Parameters:
uri - The URI of the discovery server to discover.
- Throws:
ServerListException - if the discovery fails
discover
public void discover(UaApplication.Protocol protocol,
String hostName)
throws ServerListException
- Discover OPCUA applications from a discovery server. The method assumes that the server is
listening in the default discovery port, 4840.
If the method succeed, the servers listed in the discovery server are added to this ServerList.
- Parameters:
protocol - Communication protocol to usehostName - the host name of the computer
- Throws:
ServerListException - if the server list cannot be retrieved.
discover
public void discover(String discoveryServerUri)
throws ServerListException
- Discover OPCUA applications from a discovery server.
- Specified by:
discover in class ServerListBase
- Parameters:
discoveryServerUri - URI of the discovery server
- Throws:
ServerListException - if the discovery
Copyright © 2018. All rights reserved.