|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opcfoundation.ua.application.Client
public class Client
OPC UA Client application
| Constructor Summary | |
|---|---|
Client(Application application)
Construct a new client application Note: Client needs an application instance certificate to create secure channels. |
|
| Method Summary | |
|---|---|
ApplicationDescription |
createApplicationDescription()
createApplicationDescription. |
static Client |
createClientApplication(KeyPair cert)
createClientApplication. |
SecureChannel |
createSecureChannel(ApplicationDescription applicationDescription)
Create a secure channel to a UA application This implementation accepts only connections with opc.tcp protocol and with encryption. |
SecureChannel |
createSecureChannel(EndpointDescription endpoint)
Create a secure channel to an endpoint |
SecureChannel |
createSecureChannel(String endpointUrl)
Create a secure channel to a UA Server This method first queries endpoints, chooses the most suitable and connects to it. |
SecureChannel |
createSecureChannel(String connectUrl,
EndpointDescription endpoint)
Create a secure channel to an endpoint. |
SecureChannel |
createSecureChannel(String connectUrl,
String endpointUri)
Create a secure channel to a UA Server This method first queries endpoints, chooses the most suitable and connects to it. |
SecureChannel |
createSecureChannel(String connectUrl,
String endpointUri,
SecurityMode mode,
Cert remoteCertificate)
Create and open a secure channel. |
SecureChannel |
createSecureChannel(String connectUrl,
TransportChannelSettings settings)
Create and open a secure channel. |
SecureChannel |
createSecureChannel(TransportChannelSettings settings)
Create and open a secure channel. |
ServiceChannel |
createServiceChannel(ApplicationDescription applicationDescription)
Create a service channel Note this implementation is unsecure as the dialog with discover endpoint is not encrypted. |
ServiceChannel |
createServiceChannel(EndpointDescription endpoint)
Create a service channel to an endpoint. |
ServiceChannel |
createServiceChannel(String endpointUrl)
Create a service channel to a UA Server This method first queries endpoints, chooses the most suitable and connects to it. |
ServiceChannel |
createServiceChannel(String connectUrl,
EndpointDescription endpoint)
Create a service channel to an endpoint |
ServiceChannel |
createServiceChannel(String connectUrl,
String endpointUri)
Create a service channel to a UA Server This method first queries endpoints, chooses the most suitable and connects to it. |
ServiceChannel |
createServiceChannel(String connectUrl,
String endpointUri,
SecurityMode mode,
Cert remoteCertificate)
Create and open a service channel. |
ServiceChannel |
createServiceChannel(TransportChannelSettings settings)
Create and open a secure channel and adapt to service channel. |
Session |
createSession(SecureChannel channel)
Create a new session on a server. |
Session |
createSession(SecureChannel channel,
UnsignedInteger maxResponseMessageSize,
Double requestedSessionTimeout,
String sessionName)
Create a new session on a server |
Session |
createSession(SecureChannel channel,
UnsignedInteger maxResponseMessageSize,
Double requestedSessionTimeout,
String sessionName,
EndpointDescription[] discoveredEndpoints)
Create a new session on a server |
SessionChannel |
createSessionChannel(ApplicationDescription applicationDescription)
Creates a secure channel and an unactivated session channel. |
SessionChannel |
createSessionChannel(EndpointDescription endpoint)
Creates a secure channel and an unactivated session channel. |
SessionChannel |
createSessionChannel(String endpointUrl)
Creates a secure channel and an unactivated session channel. |
SessionChannel |
createSessionChannel(String connectUrl,
EndpointDescription endpoint)
Creates a secure channel and an unactivated session channel. |
SessionChannel |
createSessionChannel(String connectUrl,
String endpointUri)
Creates a secure channel and an unactivated session channel. |
ApplicationDescription[] |
discoverApplications(String discoverServerEndpointUrl)
Discover applications |
ApplicationDescription[] |
discoverApplications(String connectUrl,
String discoverServerEndpointUri)
Discover applications |
EndpointDescription[] |
discoverEndpoints(String discoveryEndpointUrl)
Discover endpoints |
EndpointDescription[] |
discoverEndpoints(String connectUrl,
String discoveryEndpointUri)
Discover endpoints. |
ServerOnNetwork[] |
discoverServersOnNetwork(String discoverServerEndpointUrl)
Discover ServerOnNetwork records from LDS |
ServerOnNetwork[] |
discoverServersOnNetwork(String connectUrl,
String discoverServerEndpointUri)
Discover ServerOnNetwork records from LDS |
ServerOnNetwork[] |
discoverServersOnNetwork(String connectUrl,
String discoverServerEndpointUri,
String[] serverCapabilities)
Discover ServerOnNetwork records from LDS |
FindServersOnNetworkResponse |
discoverServersOnNetwork(String connectUrl,
String discoverServerEndpointUri,
UnsignedInteger startingRecordId,
UnsignedInteger maxRecordsToReturn,
String[] serverCapabilities)
Get FindServersOnNetworkResponse to retrieve ServerOnNetwork records and lastCounterResetTime associated with them |
Application |
getApplication()
Getter for the field application. |
HttpsSettings |
getApplicationHttpsSettings()
getApplicationHttpsSettings. |
OpcTcpSettings |
getApplicatioOpcTcpSettings()
getApplicatioOpcTcpSettings. |
EncoderContext |
getEncoderContext()
getEncoderContext. |
EndpointConfiguration |
getEndpointConfiguration()
Getter for the field endpointConfiguration. |
int |
getMaxMessageSize()
getMaxMessageSize. |
int |
getTimeout()
getTimeout. |
void |
setEndpointConfiguration(EndpointConfiguration endpointConfiguration)
Setter for the field endpointConfiguration. |
void |
setMaxMessageSize(int maxMessagSize)
setMaxMessageSize. |
void |
setTimeout(int timeout)
setTimeout. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Client(Application application)
Note: Client needs an application instance certificate to create secure
channels. See Application.addApplicationInstanceCertificate(KeyPair)
application - common application data| Method Detail |
|---|
public static Client createClientApplication(KeyPair cert)
createClientApplication.
cert - a KeyPair object.
Client object.public ApplicationDescription createApplicationDescription()
createApplicationDescription.
ApplicationDescription object.public Application getApplication()
Getter for the field application.
Application object.public HttpsSettings getApplicationHttpsSettings()
getApplicationHttpsSettings.
HttpsSettings object.public OpcTcpSettings getApplicatioOpcTcpSettings()
getApplicatioOpcTcpSettings.
OpcTcpSettings object.
public Session createSession(SecureChannel channel)
throws ServiceResultException
channel - open channel
ServiceResultException - if error
public Session createSession(SecureChannel channel,
UnsignedInteger maxResponseMessageSize,
Double requestedSessionTimeout,
String sessionName)
throws IllegalArgumentException,
ServiceResultException
channel - open channel to usemaxResponseMessageSize - max size of response messages - if null, use 4194304requestedSessionTimeout - requested session time out (in ms) - if null, use 3600000 (one hour)sessionName - session name - if null a random GUID is used to generate the
name
IllegalArgumentException - if error
ServiceResultException - if error
public Session createSession(SecureChannel channel,
UnsignedInteger maxResponseMessageSize,
Double requestedSessionTimeout,
String sessionName,
EndpointDescription[] discoveredEndpoints)
throws IllegalArgumentException,
ServiceResultException
channel - open channel to usemaxResponseMessageSize - max size of response messages - if null, defaulting to 4194304requestedSessionTimeout - requested session timeout (ms) - if null, defaulting to 3600000 (one hour)sessionName - session name - if null, a random GUID is used to generate the namediscoveredEndpoints - list of previously discovered Endpoints using GetEndpoints service.
This list is checked against the Endpoint list received from CreateSessionResponse,
if it does not match, an exception is thrown, if null the check is disabled
IllegalArgumentException - if endpoint or channel is null
ServiceResultException - if error
public SessionChannel createSessionChannel(String endpointUrl)
throws ServiceResultException
The channel needs to be activated separately.
To close the object, both secure channel and the session must be close separately. SessionChannel.closeSession() SessionChannel.closeSecureChannel()
endpointUrl - endpoint identifier and socket address
ServiceResultException - if error
public SessionChannel createSessionChannel(String connectUrl,
String endpointUri)
throws ServiceResultException
The channel needs to be activated separately.
To close the object, both secure channel and the session must be close separately. SessionChannel.closeSession() SessionChannel.closeSecureChannel()
connectUrl - address that contains the socket address to the endpointendpointUri - endpoint identifier
ServiceResultException - if error
public SessionChannel createSessionChannel(EndpointDescription endpoint)
throws ServiceResultException
The channel needs to be activated separately.
To close the object, both secure channel and the session must be close separately. SessionChannel.closeSession() SessionChannel.closeSecureChannel()
endpoint - endpoint description
ServiceResultException - on errors
public SessionChannel createSessionChannel(String connectUrl,
EndpointDescription endpoint)
throws ServiceResultException
The channel needs to be activated separately.
To close the object, both secure channel and the session must be close separately. SessionChannel.closeSession() SessionChannel.closeSecureChannel()
connectUrl - address that contains the socket address to the endpointendpoint - endpoint description
ServiceResultException - on errors
public SessionChannel createSessionChannel(ApplicationDescription applicationDescription)
throws ServiceResultException
The channel needs to be activated separately.
To close the object, both secure channel and the session must be close separately. SessionChannel.closeSession() SessionChannel.closeSecureChannel()
applicationDescription - application description
ServiceResultException - on errors
public SecureChannel createSecureChannel(String endpointUrl)
throws ServiceResultException
endpointUrl - Endpoint identifier and socket address
ServiceResultException - if error
public SecureChannel createSecureChannel(String connectUrl,
String endpointUri)
throws ServiceResultException
connectUrl - address that contains the socket address to the endpointendpointUri - EndpointUri identifier or "" for discovery
ServiceResultException - if error
public SecureChannel createSecureChannel(ApplicationDescription applicationDescription)
throws ServiceResultException
This implementation accepts only connections with opc.tcp protocol and with encryption.
Note this implementation is unsafe as the dialog with discover endpoint is not encrypted.
applicationDescription - application description
ServiceResultException - if error
public SecureChannel createSecureChannel(EndpointDescription endpoint)
throws ServiceResultException
endpoint - endpoint description
ServiceResultException - if errror
public SecureChannel createSecureChannel(String connectUrl,
EndpointDescription endpoint)
throws ServiceResultException
connectUrl - address that contains the socket address to the endpointendpoint - endpoint description
ServiceResultException - if error
public SecureChannel createSecureChannel(String connectUrl,
String endpointUri,
SecurityMode mode,
Cert remoteCertificate)
throws ServiceResultException
connectUrl - address that contains the socket address to the endpointendpointUri - endpoint urimode - security moderemoteCertificate - remove certificate
ServiceResultException - if error
public SecureChannel createSecureChannel(String connectUrl,
TransportChannelSettings settings)
throws ServiceResultException
connectUrl - address that contains the socket address to the endpointsettings - (optional) overriding settings
ServiceResultException - if error
public SecureChannel createSecureChannel(TransportChannelSettings settings)
throws ServiceResultException
settings - transport settings
ServiceResultException - if error
public ServiceChannel createServiceChannel(String endpointUrl)
throws ServiceResultException
endpointUrl - endpoint idenfier and socket address
ServiceResultException - if error
public ServiceChannel createServiceChannel(String connectUrl,
String endpointUri)
throws ServiceResultException
connectUrl - connection urlendpointUri - endpointUri idenfier or "" for discovery service
ServiceResultException - if error
public ServiceChannel createServiceChannel(ApplicationDescription applicationDescription)
throws ServiceResultException
Note this implementation is unsecure as the dialog with discover endpoint is not encrypted.
applicationDescription - application description
ServiceResultException - if error
public ServiceChannel createServiceChannel(EndpointDescription endpoint)
throws ServiceResultException
endpoint - endpoint description
ServiceResultException - if error
public ServiceChannel createServiceChannel(String connectUrl,
EndpointDescription endpoint)
throws ServiceResultException
connectUrl - address that contains the socket address to the endpointendpoint - endpoint description
ServiceResultException - if error
public ServiceChannel createServiceChannel(String connectUrl,
String endpointUri,
SecurityMode mode,
Cert remoteCertificate)
throws ServiceResultException
connectUrl - address that contains the socket address to the endpointendpointUri - endpointUri identifier of the endpointmode - security moderemoteCertificate - remote certificate
ServiceResultException - if error
public ServiceChannel createServiceChannel(TransportChannelSettings settings)
throws ServiceResultException
settings - transport settings
ServiceResultException - if error
public EndpointDescription[] discoverEndpoints(String discoveryEndpointUrl)
throws ServiceResultException
discoveryEndpointUrl - endpoint identifier or socket address
ServiceResultException - Error that occured while processing the operation.
public EndpointDescription[] discoverEndpoints(String connectUrl,
String discoveryEndpointUri)
throws ServiceResultException
connectUrl - address that contains the socket address to the endpointdiscoveryEndpointUri - the endpoint identifier that identifies the endpoints that are being discovered
ServiceResultException - Error that occured while processing the operation.
public ApplicationDescription[] discoverApplications(String discoverServerEndpointUrl)
throws ServiceResultException
discoverServerEndpointUrl - endpointURI that is also the socket address
ServiceResultException - if error
public ApplicationDescription[] discoverApplications(String connectUrl,
String discoverServerEndpointUri)
throws ServiceResultException
connectUrl - address that contains the socket address to the endpointdiscoverServerEndpointUri - endpointURI or ""
ServiceResultException - if error
public ServerOnNetwork[] discoverServersOnNetwork(String discoverServerEndpointUrl)
throws ServiceResultException
discoverServerEndpointUrl - endpointURI that is also the socket address
ServiceResultException - if error
public ServerOnNetwork[] discoverServersOnNetwork(String connectUrl,
String discoverServerEndpointUri)
throws ServiceResultException
connectUrl - address that contains the socket address to the endpointdiscoverServerEndpointUri - endpointURI or ""
ServiceResultException - if error
public ServerOnNetwork[] discoverServersOnNetwork(String connectUrl,
String discoverServerEndpointUri,
String[] serverCapabilities)
throws ServiceResultException
connectUrl - address that contains the socket address to the endpointdiscoverServerEndpointUri - endpointURI or ""serverCapabilities - list of server capability filters
ServiceResultException - if error
public FindServersOnNetworkResponse discoverServersOnNetwork(String connectUrl,
String discoverServerEndpointUri,
UnsignedInteger startingRecordId,
UnsignedInteger maxRecordsToReturn,
String[] serverCapabilities)
throws ServiceResultException
connectUrl - address that contains the socket address to the endpointdiscoverServerEndpointUri - endpointURI or ""startingRecordId - smallest id of records to be returnedmaxRecordsToReturn - maximum number of records to returnserverCapabilities - list of server capability filters
ServiceResultException - if errorpublic EncoderContext getEncoderContext()
getEncoderContext.
EncoderContext object.public void setTimeout(int timeout)
setTimeout.
timeout - a int.public int getTimeout()
getTimeout.
public void setMaxMessageSize(int maxMessagSize)
setMaxMessageSize.
maxMessagSize - a int.public int getMaxMessageSize()
getMaxMessageSize.
public EndpointConfiguration getEndpointConfiguration()
Getter for the field endpointConfiguration.
EndpointConfiguration object.public void setEndpointConfiguration(EndpointConfiguration endpointConfiguration)
Setter for the field endpointConfiguration.
endpointConfiguration - a EndpointConfiguration object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||