com.prosysopc.ua.client
Class ServerListBase

java.lang.Object
  extended by com.prosysopc.ua.client.ServerListBase
Direct Known Subclasses:
GlobalServerList, ServerList

public abstract class ServerListBase
extends Object

A base class for ServerLists discovered from discovery servers.


Field Summary
protected  org.opcfoundation.ua.builtintypes.DateTime lastCounterResetTime
           
protected  List<org.opcfoundation.ua.core.ApplicationDescription> servers
           
protected  List<org.opcfoundation.ua.core.ServerOnNetwork> serversOnNetwork
           
 
Constructor Summary
ServerListBase()
           
ServerListBase(String uri)
          Create a new list of servers, containing the servers discovered from a discoveryServer.
 
Method Summary
 void clear()
          Clears the list.
abstract  void discover(String discoveryServerUri)
          Discover OPCUA applications from a discovery server.
 org.opcfoundation.ua.core.ApplicationDescription get(int index)
          Get the description of a server.
 org.opcfoundation.ua.builtintypes.DateTime getLastCounterResetTime()
          The last time the counters were reset
 org.opcfoundation.ua.core.ApplicationDescription[] getServers()
          The current list of discovered servers.
 org.opcfoundation.ua.core.ServerOnNetwork[] getServersOnNetwork()
          Get the discovered ServerOnNetwork records
 boolean isEmpty()
          Check if the getServers() list is empty.
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lastCounterResetTime

protected org.opcfoundation.ua.builtintypes.DateTime lastCounterResetTime

servers

protected final List<org.opcfoundation.ua.core.ApplicationDescription> servers

serversOnNetwork

protected final List<org.opcfoundation.ua.core.ServerOnNetwork> serversOnNetwork
Constructor Detail

ServerListBase

public ServerListBase()

ServerListBase

public ServerListBase(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

clear

public void clear()
Clears the list.


discover

public abstract void discover(String discoveryServerUri)
                       throws ServerListException
Discover OPCUA applications from a discovery server.

Parameters:
discoveryServerUri - URI of the discovery server
Throws:
ServerListException - if the discovery

get

public org.opcfoundation.ua.core.ApplicationDescription get(int index)
Get the description of a server.

Parameters:
index - the index of the server in the list
Returns:
the application description of the server

getLastCounterResetTime

public org.opcfoundation.ua.builtintypes.DateTime getLastCounterResetTime()
The last time the counters were reset

Returns:
time as DateTime object

getServers

public org.opcfoundation.ua.core.ApplicationDescription[] getServers()
The current list of discovered servers.

Returns:
the servers in an array

getServersOnNetwork

public org.opcfoundation.ua.core.ServerOnNetwork[] getServersOnNetwork()
Get the discovered ServerOnNetwork records

Returns:
the servers in an array

isEmpty

public boolean isEmpty()
Check if the getServers() list is empty. Note that getServersOnNetwork() may still provide entries.

Returns:
true if size() == 0

size

public int size()
Returns:
the number of elements in the list.


Copyright © 2018. All rights reserved.