com.prosysopc.ua.client
Class ServerList

java.lang.Object
  extended by com.prosysopc.ua.client.ServerListBase
      extended by 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.


Field Summary
 
Fields inherited from class com.prosysopc.ua.client.ServerListBase
lastCounterResetTime, servers, serversOnNetwork
 
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.
 
Method Summary
 void discover(String discoveryServerUri)
          Discover OPCUA applications from a discovery server.
 void discover(UaApplication.Protocol protocol, String hostName)
          Discover OPCUA applications from a discovery server.
 
Methods inherited from class com.prosysopc.ua.client.ServerListBase
clear, get, getLastCounterResetTime, getServers, getServersOnNetwork, isEmpty, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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
Method Detail

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 use
hostName - 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.