Interface SystemDescription

  • All Known Subinterfaces:
    ArSystem, SystemIdentityDescription

    public interface SystemDescription
    Describes an Arrowhead system that can, potentially, be communicated with.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      static SystemDescription from​(java.lang.String name, java.net.InetSocketAddress remoteSocketAddress)
      Creates new Arrowhead provider system description.
      static SystemDescription from​(java.lang.String name, java.security.PublicKey publicKey, java.net.InetSocketAddress remoteSocketAddress)
      Creates new Arrowhead provider system description.
      boolean isSecure()
      Determines whether the described service is known to be running in secure mode, in which cause publicKey() ()} is guaranteed not to throw when called.
      java.lang.String name()
      Gets name of described system.
      java.security.PublicKey publicKey()
      Gets public key of peer system, or throws if not in secure mode.
      java.net.InetSocketAddress socketAddress()
      The socket address of the described system.
    • Method Detail

      • from

        static SystemDescription from​(java.lang.String name,
                                      java.security.PublicKey publicKey,
                                      java.net.InetSocketAddress remoteSocketAddress)
        Creates new Arrowhead provider system description.
        Parameters:
        name - System name.
        publicKey - System public key.
        remoteSocketAddress - IP-address/hostname and port through which the system can be contacted.
        Throws:
        java.lang.NullPointerException - If name or remoteSocketAddress is null.
      • from

        static SystemDescription from​(java.lang.String name,
                                      java.net.InetSocketAddress remoteSocketAddress)
        Creates new Arrowhead provider 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.
      • name

        java.lang.String name()
        Gets name of described system.
        Returns:
        System name.
      • socketAddress

        java.net.InetSocketAddress socketAddress()
        The socket address of the described system.
        Returns:
        The hostname/port or IP-address/port of the described system.
      • isSecure

        boolean isSecure()
        Determines whether the described service is known to be running in secure mode, in which cause publicKey() ()} is guaranteed not to throw when called.
        Returns:
        true only if the described service is known to be running in secure mode.
      • publicKey

        java.security.PublicKey publicKey()
        Gets public key of peer system, or throws if not in secure mode.
        Returns:
        System public key.
        Throws:
        SecurityDisabled - If the system does not have an public key. This will only be the case if the described system runs in the insecure security mode, which it only can do if the system that requested it also runs in insecure mode.