Package org.axonframework.messaging.core
Record Class QualifiedName
java.lang.Object
java.lang.Record
org.axonframework.messaging.core.QualifiedName
- Record Components:
name- The qualifiedName of thisQualifiedName. Must not benullor empty.
Interface describing a qualified
qualifiedName, providing space for a namespace,
local qualifiedName.
The given qualifiedName uses a dot . as the separator between the namespace and
local qualifiedName. When multiple dots are present in the qualifiedName, the
local qualifiedName constitutes the trailing text after the last dot. Thus, the
namespace as all the text before the last dot.
The QualifiedName is useful to provide clear names to Messages,
MessageHandlers, and other components that require naming. To combine a qualified
qualifiedName with a version, consider using the MessageType.
- Since:
- 5.0.0
- Author:
- Allard Buijze, Mitchell Herrijgers, Steven van Beelen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionQualifiedName(Class<?> clazz) QualifiedName(String name) Compact constructor asserting whether thequalifiedNameis non-null and not empty.QualifiedName(String namespace, String localName) Constructor providing combining the givennamespaceandlocalName, delimited by a dot.. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fullName()Returns the full name of this QualifiedName, consisting of the namespace and localName, separated by a "."final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
QualifiedName
Compact constructor asserting whether thequalifiedNameis non-null and not empty. -
QualifiedName
Constructor providing combining the givennamespaceandlocalName, delimited by a dot..If the given
namespaceis an empty ornullString, thename()becomes thelocalName. If thelocalNameis empty ornull, anIllegalArgumentExceptionwill be thrown. -
QualifiedName
- Parameters:
clazz- TheClassfrom which to use theClass.getName()as thename().
-
-
Method Details
-
namespace
-
localName
-
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. -
fullName
Returns the full name of this QualifiedName, consisting of the namespace and localName, separated by a "." (dot). If no namespace is defined, it returns the localName only.- Returns:
- the full name of this QualifiedName
- See Also:
-
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-