Package org.wildfly.service.descriptor
Interface UnaryServiceDescriptor<T>
- Type Parameters:
T- the type of the value provided by the described service
- All Superinterfaces:
ServiceDescriptor<T>
- All Known Subinterfaces:
UnaryServiceDescriptor.Provider<T>
Describes a service by its name, provided value type, and dynamic name resolution mechanism.
- Author:
- Paul Ferraro
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceProvides a one segment service descriptor. -
Method Summary
Modifier and TypeMethodDescriptiondefault <U extends T>
UnaryServiceDescriptor<U>Returns a sub-class view of this service descriptor.static <T> UnaryServiceDescriptor<T>Creates a unary service descriptor with the specified name and type.static <T> UnaryServiceDescriptor<T>of(String name, NullaryServiceDescriptor<T> defaultDescriptor) Creates a unary service descriptor with the specified name and default service descriptor.Resolves the dynamic name of the service using the specified segment.Methods inherited from interface org.wildfly.service.descriptor.ServiceDescriptor
getName, getType
-
Method Details
-
resolve
Resolves the dynamic name of the service using the specified segment.- Parameters:
reference- a dynamic segment- Returns:
- a tuple containing the resolved name and dynamic segments, or null if segment is not resolvable.
-
asType
Description copied from interface:ServiceDescriptorReturns a sub-class view of this service descriptor.- Specified by:
asTypein interfaceServiceDescriptor<T>- Type Parameters:
U- the subclass type- Parameters:
type- a sub-class of this descriptor's type- Returns:
- a sub-class view of this service descriptor.
-
of
Creates a unary service descriptor with the specified name and type.- Type Parameters:
T- the service type- Parameters:
name- the service nametype- the service type- Returns:
- a service descriptor
-
of
Creates a unary service descriptor with the specified name and default service descriptor.- Type Parameters:
T- the service type- Parameters:
name- the service namedefaultDescriptor- the service descriptor used to resolve an undefined dynamic name- Returns:
- a service descriptor
-