Package org.wildfly.service.descriptor
Interface QuaternaryServiceDescriptor<T>
-
- Type Parameters:
T- the type of the value provided by the described service
- All Superinterfaces:
ServiceDescriptor<T>
- All Known Subinterfaces:
QuaternaryServiceDescriptor.Provider<T>
public interface QuaternaryServiceDescriptor<T> extends ServiceDescriptor<T>
Describes a service by its name, provided value type, and dynamic name resolution mechanism.- Author:
- Paul Ferraro
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceQuaternaryServiceDescriptor.Provider<T>Provides a four segment service descriptor.
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default <U extends T>
QuaternaryServiceDescriptor<U>asType(Class<U> type)Returns a sub-class view of this service descriptor.static <T> QuaternaryServiceDescriptor<T>of(String name, Class<T> type)Creates a quaternary service descriptor with the specified name and type.static <T> QuaternaryServiceDescriptor<T>of(String name, TernaryServiceDescriptor<T> defaultDescriptor)Creates a quaternary service descriptor with the specified name and default service descriptor.default Map.Entry<String,String[]>resolve(String greatGrandparent, String grandparent, String parent, String child)Resolves the dynamic name the service using the specified segments.-
Methods inherited from interface org.wildfly.service.descriptor.ServiceDescriptor
getName, getType
-
-
-
-
Method Detail
-
resolve
default Map.Entry<String,String[]> resolve(String greatGrandparent, String grandparent, String parent, String child)
Resolves the dynamic name the service using the specified segments.- Parameters:
greatGrandparent- the first dynamic segmentgrandparent- the second dynamic segmentparent- the third dynamic segmentchild- the fourth dynamic segment- Returns:
- a tuple containing the resolved name and dynamic segments
-
asType
default <U extends T> QuaternaryServiceDescriptor<U> asType(Class<U> type)
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
static <T> QuaternaryServiceDescriptor<T> of(String name, Class<T> type)
Creates a quaternary 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
static <T> QuaternaryServiceDescriptor<T> of(String name, TernaryServiceDescriptor<T> defaultDescriptor)
Creates a quaternary 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 child name- Returns:
- a service descriptor
-
-