Class ServiceInfo


  • public class ServiceInfo
    extends java.lang.Object
    A representation of a service identifier together with the DOIPServiceInfo needed for connecting to the DOIP service.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String ipAddress
      The IP address to connect to.
      int port
      The port to connect to.
      java.lang.String protocol
      The protocol; currently assumed to be TCP.
      java.lang.String protocolVersion
      The protocol version; currently assume to be DOIPv2.
      java.security.PublicKey publicKey
      The public key of the service (serialized in JWK format).
      java.lang.String serviceId
      The service identifier.
      java.lang.String serviceName
      Currently unused.
    • Constructor Summary

      Constructors 
      Constructor Description
      ServiceInfo()
      Constructs a ServiceInfo with all fields unpopulated.
      ServiceInfo​(java.lang.String serviceId)
      Constructs a ServiceInfo with only a service identifier.
      ServiceInfo​(java.lang.String serviceId, java.lang.String ipAddress, int port)
      Constructs a ServiceInfo with a service identifier, an IP address, and a port.
      ServiceInfo​(java.lang.String serviceId, java.lang.String ipAddress, int port, java.security.PublicKey publicKey)
      Constructs a ServiceInfo with a service identifier, an IP address, a port, and the expecte public key in the server certificate.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • serviceId

        public java.lang.String serviceId
        The service identifier. A ServiceInfo provided to methods of DoipClient may have only a serviceId in which case the client will resolve the identifier to find the actual service info.
      • serviceName

        public java.lang.String serviceName
        Currently unused.
      • ipAddress

        public java.lang.String ipAddress
        The IP address to connect to.
      • port

        public int port
        The port to connect to.
      • protocol

        public java.lang.String protocol
        The protocol; currently assumed to be TCP.
      • protocolVersion

        public java.lang.String protocolVersion
        The protocol version; currently assume to be DOIPv2.
      • publicKey

        public java.security.PublicKey publicKey
        The public key of the service (serialized in JWK format).
    • Constructor Detail

      • ServiceInfo

        public ServiceInfo()
        Constructs a ServiceInfo with all fields unpopulated.
      • ServiceInfo

        public ServiceInfo​(java.lang.String serviceId)
        Constructs a ServiceInfo with only a service identifier. If supplied to methods of DoipClient, the client will resolve the identifier to find the service information.
        Parameters:
        serviceId - the service identifier
      • ServiceInfo

        public ServiceInfo​(java.lang.String serviceId,
                           java.lang.String ipAddress,
                           int port)
        Constructs a ServiceInfo with a service identifier, an IP address, and a port. With no public key, the server certificate will not be checked.
        Parameters:
        serviceId - the service identifier
        ipAddress - the IP address
        port - the port
      • ServiceInfo

        public ServiceInfo​(java.lang.String serviceId,
                           java.lang.String ipAddress,
                           int port,
                           java.security.PublicKey publicKey)
        Constructs a ServiceInfo with a service identifier, an IP address, a port, and the expecte public key in the server certificate.
        Parameters:
        serviceId - the service identifier
        ipAddress - the IP address
        port - the port
        publicKey - the public key of the server