use of com.att.cdp.exceptions.ContextClosedException in project AJSC by att.
the class AbstractService method checkOpen.
/**
* This method checks to see if the open flag has been cleared (indicating that the context has been closed). If the
* context has been closed, then an exception is thrown indicating that the context has been closed and cannot be
* used. If the open flag has not been cleared, indicating that the context is still usable, the method simply
* returns to the caller.
*
* @throws ContextClosedException
* IFF the context has been closed.
*/
protected void checkOpen() throws ContextClosedException {
if (!context.isOpen()) {
Provider provider = context.getProvider();
String msg = EELFResourceManager.format(Msg.PROVIDER_CONTEXT_IS_CLOSED, provider.getName());
appLogger.error(msg);
throw new ContextClosedException(msg);
}
}
Aggregations