Class OpcUaSession
java.lang.Object
java.util.AbstractMap<K,V>
java.util.concurrent.ConcurrentHashMap<String,Object>
org.eclipse.milo.opcua.sdk.client.OpcUaSession
- All Implemented Interfaces:
Serializable,ConcurrentMap<String,,Object> Map<String,,Object> UaSession
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap
ConcurrentHashMap.KeySetView<K extends Object,V extends Object> Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionOpcUaSession(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId authToken, org.eclipse.milo.opcua.stack.core.types.builtin.NodeId sessionId, String sessionName, double sessionTimeout, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger maxRequestSize, org.eclipse.milo.opcua.stack.core.types.builtin.ByteString serverCertificate, org.eclipse.milo.opcua.stack.core.types.structured.SignedSoftwareCertificate[] serverSoftwareCertificates) -
Method Summary
Modifier and TypeMethodDescription@Nullable ObjectgetAttribute(@NonNull String name) Returns the attribute bound tonamein this session, ornullif no attribute is bound under that name.org.eclipse.milo.opcua.stack.core.types.builtin.NodeIdGet the authentication token assigned by the server.org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UIntegerorg.eclipse.milo.opcua.stack.core.types.builtin.ByteStringorg.eclipse.milo.opcua.stack.core.types.builtin.ByteStringorg.eclipse.milo.opcua.stack.core.types.structured.SignedSoftwareCertificate[]org.eclipse.milo.opcua.stack.core.types.builtin.NodeIdGet the session id assigned by the server.Get the revised session timeout, that is, the number of milliseconds a session may remain open without activity.removeAttribute(@NonNull String name) Removes the attribute bound with the specified name from this session.@Nullable ObjectsetAttribute(@NonNull String name, @NonNull Object value) Binds an attribute to this session, using the name specified.voidsetServerNonce(org.eclipse.milo.opcua.stack.core.types.builtin.ByteString serverNonce) toString()Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, valuesMethods inherited from class java.util.AbstractMap
clone
-
Constructor Details
-
OpcUaSession
public OpcUaSession(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId authToken, org.eclipse.milo.opcua.stack.core.types.builtin.NodeId sessionId, String sessionName, double sessionTimeout, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger maxRequestSize, org.eclipse.milo.opcua.stack.core.types.builtin.ByteString serverCertificate, org.eclipse.milo.opcua.stack.core.types.structured.SignedSoftwareCertificate[] serverSoftwareCertificates)
-
-
Method Details
-
getAuthenticationToken
public org.eclipse.milo.opcua.stack.core.types.builtin.NodeId getAuthenticationToken()Description copied from interface:UaSessionGet the authentication token assigned by the server.- Specified by:
getAuthenticationTokenin interfaceUaSession- Returns:
- a unique
NodeIdassigned by the server to the session.
-
getSessionId
public org.eclipse.milo.opcua.stack.core.types.builtin.NodeId getSessionId()Description copied from interface:UaSessionGet the session id assigned by the server.This identifier is used to access the diagnostics information for the session in the server address space. It is also used in the audit logs and any events that report information related to the session.
- Specified by:
getSessionIdin interfaceUaSession- Returns:
- a unique
NodeIdassigned by the server to the session.
-
getSessionName
- Specified by:
getSessionNamein interfaceUaSession- Returns:
- the human-readable name assigned to this session by the client.
-
getSessionTimeout
Description copied from interface:UaSessionGet the revised session timeout, that is, the number of milliseconds a session may remain open without activity.- Specified by:
getSessionTimeoutin interfaceUaSession- Returns:
- the revised session timeout.
-
getMaxRequestSize
public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger getMaxRequestSize()- Specified by:
getMaxRequestSizein interfaceUaSession- Returns:
- the maximum allowable size for any request sent to the server.
-
getServerSoftwareCertificates
public org.eclipse.milo.opcua.stack.core.types.structured.SignedSoftwareCertificate[] getServerSoftwareCertificates()- Specified by:
getServerSoftwareCertificatesin interfaceUaSession- Returns:
- the server
SignedSoftwareCertificates.
-
getServerCertificate
public org.eclipse.milo.opcua.stack.core.types.builtin.ByteString getServerCertificate()- Specified by:
getServerCertificatein interfaceUaSession- Returns:
- the server application instance certificate.
-
getServerNonce
public org.eclipse.milo.opcua.stack.core.types.builtin.ByteString getServerNonce()- Specified by:
getServerNoncein interfaceUaSession- Returns:
- the last nonce received from the server.
-
setServerNonce
public void setServerNonce(org.eclipse.milo.opcua.stack.core.types.builtin.ByteString serverNonce) -
getAttribute
Description copied from interface:UaSessionReturns the attribute bound tonamein this session, ornullif no attribute is bound under that name.- Specified by:
getAttributein interfaceUaSession- Parameters:
name- the name the attribute is bound to.- Returns:
- the attribute value.
-
setAttribute
Description copied from interface:UaSessionBinds an attribute to this session, using the name specified.If an object of the same name is already bound to the session, the object is replaced.
- Specified by:
setAttributein interfaceUaSession- Parameters:
name- the name to bind the attribute to.value- the attribute value.- Returns:
- the previously bound value, or
nullif none exists.
-
removeAttribute
Description copied from interface:UaSessionRemoves the attribute bound with the specified name from this session.If the session does not have an attribute bound with the specified name, this method does nothing.
- Specified by:
removeAttributein interfaceUaSession- Parameters:
name- the name the attribute is bound to.- Returns:
- the previously bound value, or
nullif none exists.
-
toString
- Overrides:
toStringin classConcurrentHashMap<String,Object>
-