Interface OpcConnection


  • public interface OpcConnection
    An OpcConnection is a connection to some kind of OPC server.

    It is agnostic of the underlying technology (i.e. OPC Classic vs OPC UA) and instead relies on basic abstractions for read, write, browse, and subscribe.

    • Method Detail

      • getName

        java.lang.String getName()
        The name of this OPC connection. Must match the name of the OPCServerProfileRecord that created it.
      • getType

        java.lang.String getType()
        The type of this OPC connection. Must match the type of the OPCServerProfileRecord that created it.
      • isEnabled

        boolean isEnabled()
        Returns true if this OpcConnection is enabled.
        Returns:
        boolean true if this OpcConnection is enabled.
      • shutdown

        void shutdown()
      • getConnectionTimestamp

        @Nullable
        java.time.LocalDateTime getConnectionTimestamp()
        The timestamp when this connection made the transition to OpcConnection.State.CONNECTED, or null if not currently connected.
      • getFault

        @Nullable
        java.lang.Throwable getFault()
        If the OpcConnection.State is OpcConnection.State.FAULTED then return a Throwable containing the reason, otherwise, return null.
        Returns:
        a Throwable containing the reason for a connection fault, or null if not faulted.
      • getAliases

        default java.util.List<java.lang.String> getAliases()
        Returns the "aliases", or alternative names, for a server.

        This exists primarily to help backwards compatibility, where OPC servers were referred to by their "progids" rather than names.