Class JndiCloser
- java.lang.Object
-
- org.apache.logging.log4j.core.util.JndiCloser
-
public final class JndiCloser extends java.lang.ObjectHelper class for closing JNDI resources. This class is separate fromCloserbecause JNDI is not in Android.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateJndiCloser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclose(javax.naming.Context context)Closes the specifiedContext.static booleancloseSilently(javax.naming.Context context)Closes the specifiedContext, ignoring any exceptions thrown by the close operation.
-
-
-
Method Detail
-
close
public static void close(javax.naming.Context context) throws javax.naming.NamingExceptionCloses the specifiedContext.- Parameters:
context- the JNDI Context to close, may benull- Throws:
javax.naming.NamingException- if a problem occurred closing the specified JNDI Context- See Also:
Context.close()
-
closeSilently
public static boolean closeSilently(javax.naming.Context context)
Closes the specifiedContext, ignoring any exceptions thrown by the close operation.- Parameters:
context- the JNDI Context to close, may benull- Returns:
- Whether closing succeeded
- See Also:
Context.close()
-
-