public class

UriBasedVehicleInterfaceMixin

extends Object
java.lang.Object
   ↳ com.openxc.interfaces.UriBasedVehicleInterfaceMixin

Class Overview

A collection of utilites for vehicle interfaces that reference a physical device with a URI.

Summary

Public Constructors
UriBasedVehicleInterfaceMixin()
Public Methods
static URI createUri(String uriString)
Attempt to construct an instance of URI from the given String.
static boolean sameResource(URI uri, String otherResource)
Determine if two URIs refer to the same resource.
static boolean validateResource(String uriString)
Convert the parameter to a URI and validate the correctness of its host and port.
static boolean validateResource(URI uri)
Validate the correctness of the host and port in a given URI.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public UriBasedVehicleInterfaceMixin ()

Public Methods

public static URI createUri (String uriString)

Attempt to construct an instance of URI from the given String.

Parameters
uriString the String representation of the possible URI.
Throws
DataSourceException if the parameter is not a valid URI.

public static boolean sameResource (URI uri, String otherResource)

Determine if two URIs refer to the same resource. The function safely attempts to convert the otherResource parameter to a URI object before comparing.

Returns
  • true if the address and port match the current in-use values.

public static boolean validateResource (String uriString)

Convert the parameter to a URI and validate the correctness of its host and port.

Returns
  • true if the address and port are valid.

public static boolean validateResource (URI uri)

Validate the correctness of the host and port in a given URI.

Returns
  • true if the address and port are valid.