Interface SystemIdentityDescription

    • Method Detail

      • from

        static SystemIdentityDescription from​(SystemIdentity identity,
                                              java.net.InetSocketAddress remoteSocketAddress)
        Creates new Arrowhead consumer system description.
        Parameters:
        identity - System certificate chain.
        remoteSocketAddress - IP-address/hostname and port through which the system can be contacted.
        Throws:
        java.lang.NullPointerException - If identity or remoteSocketAddress is null.
      • from

        static SystemIdentityDescription from​(java.lang.String name,
                                              java.net.InetSocketAddress remoteSocketAddress)
        Creates new Arrowhead consumer system description.

        This constructor is meant to be used only if the system invoking it is running in insecure mode.

        Parameters:
        name - System name.
        remoteSocketAddress - IP-address/hostname and port through which the system can be contacted.
        Throws:
        java.lang.NullPointerException - If name or remoteSocketAddress is null.
      • tryFrom

        static java.util.Optional<SystemIdentityDescription> tryFrom​(java.security.cert.Certificate[] chain,
                                                                     java.net.InetSocketAddress remoteSocketAddress)
        Tries to create new Arrowhead system description from given certificate chain and remoteSocketAddress.
        Parameters:
        chain - System certificate chain.
        remoteSocketAddress - IP-address/hostname and port through which the system can be contacted.
        Returns:
        System description, if all criteria are satisfied.
      • publicKey

        default java.security.PublicKey publicKey()
        Description copied from interface: SystemDescription
        Gets public key of peer system, or throws if not in secure mode.
        Specified by:
        publicKey in interface SystemDescription
        Returns:
        System public key.
      • identity

        SystemIdentity identity()
        Gets identity of peer system, or throws if not in secure mode.
        Returns:
        System identity.
        Throws:
        SecurityDisabled - If the system does not have an identity. This will only be the case if the system that retrieved this description runs in the insecure security mode.