Class JndiCloser
- java.lang.Object
-
- org.apache.logging.log4j.core.util.JndiCloser
-
public final class JndiCloser extends java.lang.Object
Helper class for closing JNDI resources. This class is separate fromCloser
because JNDI is not in Android.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
JndiCloser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
close(javax.naming.Context context)
Closes the specifiedContext
.static boolean
closeSilently(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.NamingException
Closes the specifiedContext
.- Parameters:
context
- the JNDI Context to close, may benull
- Throws:
javax.naming.NamingException
- if a problem occurred closing the specified JNDI Context
-
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
-
-