Package org.jboss.as.controller
Class ServiceNameFactory
java.lang.Object
org.jboss.as.controller.ServiceNameFactory
Provides a factory for creating
ServiceName instances from dot-separated strings while trying to
mitigate the memory overhead of having multiple copies of elements of the name that have the same
simple name.- Author:
- Brian Stansberry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.jboss.msc.service.ServiceNameparseServiceName(String toParse) Parses a string into aServiceNameusing the same algorithm asServiceName.parse(String)but also attempts to ensure that once parsing occurs if any other name that isequal tothe parsed name or one of itsancestorshas been parsed previously that that previously parsed name is used.static org.jboss.msc.service.ServiceNameresolveServiceName(BinaryServiceDescriptor<?> descriptor, String parent, String child) Resolves the specified service descriptor and dynamic name components to aServiceName.static org.jboss.msc.service.ServiceNameresolveServiceName(NullaryServiceDescriptor<?> descriptor) Resolves the specified service descriptor to aServiceName.static org.jboss.msc.service.ServiceNameresolveServiceName(QuaternaryServiceDescriptor<?> descriptor, String ancestor, String grandparent, String parent, String child) Resolves the specified service descriptor and dynamic name components to aServiceName.static org.jboss.msc.service.ServiceNameresolveServiceName(TernaryServiceDescriptor<?> descriptor, String grandparent, String parent, String child) Resolves the specified service descriptor and dynamic name components to aServiceName.static org.jboss.msc.service.ServiceNameresolveServiceName(UnaryServiceDescriptor<?> descriptor, String name) Resolves the specified service descriptor and dynamic name component to aServiceName.
-
Constructor Details
-
ServiceNameFactory
public ServiceNameFactory()
-
-
Method Details
-
parseServiceName
Parses a string into aServiceNameusing the same algorithm asServiceName.parse(String)but also attempts to ensure that once parsing occurs if any other name that isequal tothe parsed name or one of itsancestorshas been parsed previously that that previously parsed name is used.- Parameters:
toParse- the string form of a service name. Cannot benull- Returns:
- a
ServiceNameinstance
-
resolveServiceName
public static org.jboss.msc.service.ServiceName resolveServiceName(NullaryServiceDescriptor<?> descriptor) Resolves the specified service descriptor to aServiceName.- Parameters:
descriptor- a service descriptor- Returns:
- a service name
-
resolveServiceName
public static org.jboss.msc.service.ServiceName resolveServiceName(UnaryServiceDescriptor<?> descriptor, String name) Resolves the specified service descriptor and dynamic name component to aServiceName.- Parameters:
descriptor- a service descriptorname- the dynamic name component- Returns:
- a service name
-
resolveServiceName
public static org.jboss.msc.service.ServiceName resolveServiceName(BinaryServiceDescriptor<?> descriptor, String parent, String child) Resolves the specified service descriptor and dynamic name components to aServiceName.- Parameters:
descriptor- a service descriptorparent- the 1st dynamic name componentchild- the 2nd dynamic name component- Returns:
- a service name
-
resolveServiceName
public static org.jboss.msc.service.ServiceName resolveServiceName(TernaryServiceDescriptor<?> descriptor, String grandparent, String parent, String child) Resolves the specified service descriptor and dynamic name components to aServiceName.- Parameters:
descriptor- a service descriptorgrandparent- the 1st dynamic name componentparent- the 2nd dynamic name componentchild- the 3rd dynamic name component- Returns:
- a service name
-
resolveServiceName
public static org.jboss.msc.service.ServiceName resolveServiceName(QuaternaryServiceDescriptor<?> descriptor, String ancestor, String grandparent, String parent, String child) Resolves the specified service descriptor and dynamic name components to aServiceName.- Parameters:
descriptor- a service descriptorancestor- the 1st dynamic name componentgrandparent- the 2nd dynamic name componentparent- the 3rd dynamic name componentchild- the 4th dynamic name component- Returns:
- a service name
-