Package dev.ucomprotocol.discovery
Record Class UcpDiscoveryController.UcpInfo
java.lang.Object
java.lang.Record
dev.ucomprotocol.discovery.UcpDiscoveryController.UcpInfo
- Record Components:
version- The protocol version (e.g., 2026-01-23).capabilities- A list of supported capabilities.services- A list of available services (endpoints).
- Enclosing class:
UcpDiscoveryController
public static record UcpDiscoveryController.UcpInfo(String version, List<UcpDiscoveryController.Capability> capabilities, List<UcpDiscoveryController.Service> services)
extends Record
Detailed UCP protocol information.
-
Constructor Summary
ConstructorsConstructorDescriptionUcpInfo(String version, List<UcpDiscoveryController.Capability> capabilities, List<UcpDiscoveryController.Service> services) Creates an instance of aUcpInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecapabilitiesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.services()Returns the value of theservicesrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
UcpInfo
public UcpInfo(String version, List<UcpDiscoveryController.Capability> capabilities, List<UcpDiscoveryController.Service> services) Creates an instance of aUcpInforecord class.- Parameters:
version- the value for theversionrecord componentcapabilities- the value for thecapabilitiesrecord componentservices- the value for theservicesrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
capabilities
Returns the value of thecapabilitiesrecord component.- Returns:
- the value of the
capabilitiesrecord component
-
services
Returns the value of theservicesrecord component.- Returns:
- the value of the
servicesrecord component
-