Package net.dona.doip.client
Class ServiceInfo
java.lang.Object
net.dona.doip.client.ServiceInfo
A representation of a service identifier together with the DOIPServiceInfo needed for connecting to the DOIP service.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe IP address to connect to.int
The port to connect to.The protocol; currently assumed to be TCP.The protocol version; currently assume to be DOIPv2.The public key of the service (serialized in JWK format).The service identifier.Currently unused. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a ServiceInfo with all fields unpopulated.ServiceInfo
(String serviceId) Constructs a ServiceInfo with only a service identifier.ServiceInfo
(String serviceId, String ipAddress, int port) Constructs a ServiceInfo with a service identifier, an IP address, and a port.ServiceInfo
(String serviceId, String ipAddress, int port, 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
-
Field Details
-
serviceId
The service identifier. A ServiceInfo provided to methods ofDoipClient
may have only a serviceId in which case the client will resolve the identifier to find the actual service info. -
serviceName
Currently unused. -
ipAddress
The IP address to connect to. -
port
public int portThe port to connect to. -
protocol
The protocol; currently assumed to be TCP. -
protocolVersion
The protocol version; currently assume to be DOIPv2. -
publicKey
The public key of the service (serialized in JWK format).
-
-
Constructor Details
-
ServiceInfo
public ServiceInfo()Constructs a ServiceInfo with all fields unpopulated. -
ServiceInfo
Constructs a ServiceInfo with only a service identifier. If supplied to methods ofDoipClient
, the client will resolve the identifier to find the service information.- Parameters:
serviceId
- the service identifier
-
ServiceInfo
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 identifieripAddress
- the IP addressport
- the port
-
ServiceInfo
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 identifieripAddress
- the IP addressport
- the portpublicKey
- the public key of the server
-