Package org.wildfly.naming.client.util
Class NamingUtils
- java.lang.Object
-
- org.wildfly.naming.client.util.NamingUtils
-
public final class NamingUtils extends Object
Naming-related utilities.- Author:
- John Bailey, David M. Lloyd
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ContextemptyContext(Hashtable<String,Object> environment)static NamingExceptionnamingException(String message, Throwable cause)Create a naming exception with a root cause.static NameparentOf(Name name)static voidsafeClose(Context context)static CompositeNametoCompositeName(Name name)static CompositeNametoDecomposedCompositeName(Name name)Create a CompositeName where each name segment is equal to the name segment in the source name.
-
-
-
Method Detail
-
toCompositeName
public static CompositeName toCompositeName(Name name) throws InvalidNameException
- Throws:
InvalidNameException
-
toDecomposedCompositeName
public static CompositeName toDecomposedCompositeName(Name name) throws InvalidNameException
Create a CompositeName where each name segment is equal to the name segment in the source name.- Parameters:
name- the source name- Returns:
- a
CompositeNamewhere each name segment is equal to the name segment in the source name - Throws:
InvalidNameException- if an error occurs while converting the source name to aCompositeName
-
safeClose
public static void safeClose(Context context)
-
namingException
public static NamingException namingException(String message, Throwable cause)
Create a naming exception with a root cause.- Parameters:
message- the messagecause- the cause, ornullfor none- Returns:
- the naming exception
-
-