Class Registration<T>
java.lang.Object
space.arim.omnibus.registry.Registration<T>
- Type Parameters:
T- the service type
- All Implemented Interfaces:
Comparable<Registration<T>>
A registration wrapper for a specific service, including a registration priority,
service provider implementing the service, and accompanying optional display name.
- Author:
- A248
-
Constructor Summary
ConstructorsConstructorDescriptionRegistration(byte priority, T provider, String name) Creates from a priority, provider, and display name. -
Method Summary
-
Constructor Details
-
Registration
Creates from a priority, provider, and display name.- Parameters:
priority- the priority of the registrationprovider- the provider which implements the servicename- the name- Throws:
NullPointerException- ifproviderornameis null
-
-
Method Details
-
getPriority
public byte getPriority()The priority of this registration. If multiple registrations for the same service exist, the higher priority registration is used.- Returns:
- the priority
-
getProvider
Gets the provider, or the actual service.- Returns:
- the service provider, never
null
-
getName
-
compareTo
- Specified by:
compareToin interfaceComparable<T>
-
toString
-
hashCode
-
equals
-