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

public class OpcUaSession extends ConcurrentHashMap<String,Object> implements UaSession
See Also:
  • 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: UaSession
      Get the authentication token assigned by the server.
      Specified by:
      getAuthenticationToken in interface UaSession
      Returns:
      a unique NodeId assigned by the server to the session.
    • getSessionId

      public org.eclipse.milo.opcua.stack.core.types.builtin.NodeId getSessionId()
      Description copied from interface: UaSession
      Get 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:
      getSessionId in interface UaSession
      Returns:
      a unique NodeId assigned by the server to the session.
    • getSessionName

      public String getSessionName()
      Specified by:
      getSessionName in interface UaSession
      Returns:
      the human-readable name assigned to this session by the client.
    • getSessionTimeout

      public Double getSessionTimeout()
      Description copied from interface: UaSession
      Get the revised session timeout, that is, the number of milliseconds a session may remain open without activity.
      Specified by:
      getSessionTimeout in interface UaSession
      Returns:
      the revised session timeout.
    • getMaxRequestSize

      public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger getMaxRequestSize()
      Specified by:
      getMaxRequestSize in interface UaSession
      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:
      getServerSoftwareCertificates in interface UaSession
      Returns:
      the server SignedSoftwareCertificates.
    • getServerCertificate

      public org.eclipse.milo.opcua.stack.core.types.builtin.ByteString getServerCertificate()
      Specified by:
      getServerCertificate in interface UaSession
      Returns:
      the server application instance certificate.
    • getServerNonce

      public org.eclipse.milo.opcua.stack.core.types.builtin.ByteString getServerNonce()
      Specified by:
      getServerNonce in interface UaSession
      Returns:
      the last nonce received from the server.
    • setServerNonce

      public void setServerNonce(org.eclipse.milo.opcua.stack.core.types.builtin.ByteString serverNonce)
    • getAttribute

      public @Nullable Object getAttribute(@NonNull String name)
      Description copied from interface: UaSession
      Returns the attribute bound to name in this session, or null if no attribute is bound under that name.
      Specified by:
      getAttribute in interface UaSession
      Parameters:
      name - the name the attribute is bound to.
      Returns:
      the attribute value.
    • setAttribute

      public @Nullable Object setAttribute(@NonNull String name, @NonNull Object value)
      Description copied from interface: UaSession
      Binds 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:
      setAttribute in interface UaSession
      Parameters:
      name - the name to bind the attribute to.
      value - the attribute value.
      Returns:
      the previously bound value, or null if none exists.
    • removeAttribute

      public Object removeAttribute(@NonNull String name)
      Description copied from interface: UaSession
      Removes 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:
      removeAttribute in interface UaSession
      Parameters:
      name - the name the attribute is bound to.
      Returns:
      the previously bound value, or null if none exists.
    • toString

      public String toString()
      Overrides:
      toString in class ConcurrentHashMap<String,Object>