Package org.openscada.opc.lib.list
Class ServerList
java.lang.Object
org.openscada.opc.lib.list.ServerList
A wrapper around the
OPCServerList class which makes the handling somewhat easier.- Since:
- 0.1.8
- Author:
- Jens Reimann <jens.reimann@th4-systems.com>
-
Constructor Summary
ConstructorsConstructorDescriptionServerList(String host, String user, String password) Create a new instance and a new DCOM sessionServerList(String host, String user, String password, String domain) Create a new instance and a new DCOM sessionServerList(org.jinterop.dcom.core.JISession session, String host) Create a new instance with an already existing session -
Method Summary
Modifier and TypeMethodDescriptiongetClsIdFromProgId(String progId) Fetch the class id of a prog idgetDetails(String clsId) Get the details of a opc classlistServers(Category[] implemented, Category[] required) List all servers that match the requirementslistServersWithDetails(Category[] implemented, Category[] required) List all servers that match the requirements and return the class details
-
Constructor Details
-
ServerList
public ServerList(org.jinterop.dcom.core.JISession session, String host) throws IllegalArgumentException, UnknownHostException, org.jinterop.dcom.common.JIException Create a new instance with an already existing session- Parameters:
session- the DCOM sessionhost- the host to query- Throws:
IllegalArgumentExceptionUnknownHostExceptionorg.jinterop.dcom.common.JIException
-
ServerList
public ServerList(String host, String user, String password) throws IllegalArgumentException, UnknownHostException, org.jinterop.dcom.common.JIException Create a new instance and a new DCOM session- Parameters:
host- the host to contactuser- the user to use for authenticationpassword- the password to use for authentication- Throws:
IllegalArgumentExceptionUnknownHostExceptionorg.jinterop.dcom.common.JIException
-
ServerList
public ServerList(String host, String user, String password, String domain) throws IllegalArgumentException, UnknownHostException, org.jinterop.dcom.common.JIException Create a new instance and a new DCOM session- Parameters:
host- the host to contactuser- the user to use for authenticationpassword- the password to use for authenticationdomain- The domain to use for authentication- Throws:
IllegalArgumentExceptionUnknownHostExceptionorg.jinterop.dcom.common.JIException
-
-
Method Details
-
getDetails
Get the details of a opc class- Parameters:
clsId- the class to request details for- Returns:
- The class details
- Throws:
org.jinterop.dcom.common.JIException
-
getClsIdFromProgId
Fetch the class id of a prog id- Parameters:
progId- The prog id to look up- Returns:
- the class id or
nullif none could be found. - Throws:
org.jinterop.dcom.common.JIException
-
listServers
public Collection<String> listServers(Category[] implemented, Category[] required) throws IllegalArgumentException, UnknownHostException, org.jinterop.dcom.common.JIException List all servers that match the requirements- Parameters:
implemented- All implemented categoriesrequired- All required categories- Returns:
- A collection of
class ids
- Throws:
IllegalArgumentExceptionUnknownHostExceptionorg.jinterop.dcom.common.JIException
-
listServersWithDetails
public Collection<ClassDetails> listServersWithDetails(Category[] implemented, Category[] required) throws IllegalArgumentException, UnknownHostException, org.jinterop.dcom.common.JIException List all servers that match the requirements and return the class details- Parameters:
implemented- All implemented categoriesrequired- All required categories- Returns:
- a collection of matching server and their class information
- Throws:
IllegalArgumentExceptionUnknownHostExceptionorg.jinterop.dcom.common.JIException
-