Refine search
/** * When in portable mode (default) this method verifies that the container has reached the specified minimal state. * If it hasn't, an {@link IllegalStateException} is thrown. When in non-portable mode this method is no-op. * * @param methodName * @param minimalState the minimal state * @throws IllegalStateException If the application initialization is not finished yet */ private void checkContainerState(String methodName, ContainerState minimalState) { if (nonPortableMode) { return; } if (this.container == null) { this.container = Container.instance(manager); } ContainerState state = container.getState(); if (SHUTDOWN.equals(state)) { throw BeanManagerLogger.LOG.methodNotAvailableAfterShutdown(methodName); } if (state.compareTo(minimalState) < 0) { throw BeanManagerLogger.LOG.methodNotAvailableDuringInitialization(methodName, state); } }
public static boolean available(String contextId) { return isSet(contextId) && instance(contextId).getState().isAvailable(); }
private static void checkContainerState(Container container) { ContainerState state = container.getState(); if (state.equals(ContainerState.STOPPED) || state.equals(ContainerState.SHUTDOWN)) { throw BeanManagerLogger.LOG.beanManagerNotAvailable(); } }
public void addInjectionTargetToBeInitialized(InjectionTargetInitializationContext<?> initializationContext) { if (container.getState().equals(ContainerState.VALIDATED) || container.getState().equals(ContainerState.INITIALIZED)) { // initialize now and don't store for later initialization as this has been created at runtime initializationContext.initialize(); } else { injectionTargetsToInitialize.add(initializationContext); } }
public static boolean available(String contextId) { boolean b = instance.isSet(contextId) && instance(contextId) != null && instance(contextId).getState().isAvailable(); return b; }
public static boolean available() { String id = RegistrySingletonProvider.STATIC_INSTANCE; return instance.isSet(id) && instance.get(id) != null && instance.get(id).getState().isAvailable(); }
/** * When in portable mode (default) this method verifies that the container has reached the specified minimal state. * If it hasn't, an {@link IllegalStateException} is thrown. When in non-portable mode this method is no-op. * * @param methodName * @param minimalState the minimal state * @throws IllegalStateException If the application initialization is not finished yet */ private void checkContainerState(String methodName, ContainerState minimalState) { if (nonPortableMode) { return; } if (this.container == null) { this.container = Container.instance(manager); } ContainerState state = container.getState(); if (SHUTDOWN.equals(state)) { throw BeanManagerLogger.LOG.methodNotAvailableAfterShutdown(methodName); } if (state.compareTo(minimalState) < 0) { throw BeanManagerLogger.LOG.methodNotAvailableDuringInitialization(methodName, state); } }
public static boolean available(String contextId) { return isSet(contextId) && instance(contextId).getState().isAvailable(); }
@Override public BeanManagerProxy getBeanManager() { ContainerState state = container.getState(); if (state.equals(ContainerState.STOPPED) || state.equals(ContainerState.SHUTDOWN)) { throw BeanManagerLogger.LOG.beanManagerNotAvailable(); } return beanManagers.getValue(getCallingClassName()); }
public void addInjectionTargetToBeInitialized(InjectionTargetInitializationContext<?> initializationContext) { if (container.getState().equals(ContainerState.VALIDATED) || container.getState().equals(ContainerState.INITIALIZED)) { // initialize now and don't store for later initialization as this has been created at runtime initializationContext.initialize(); } else { injectionTargetsToInitialize.add(initializationContext); } }
/** * When in portable mode (default) this method verifies that the container has reached the specified minimal state. * If it hasn't, an {@link IllegalStateException} is thrown. When in non-portable mode this method is no-op. * * @param methodName * @param minimalState the minimal state * @throws IllegalStateException If the application initialization is not finished yet */ private void checkContainerState(String methodName, ContainerState minimalState) { if (nonPortableMode) { return; } if (this.container == null) { this.container = Container.instance(manager); } ContainerState state = container.getState(); if (SHUTDOWN.equals(state)) { throw BeanManagerLogger.LOG.methodNotAvailableAfterShutdown(methodName); } if (state.compareTo(minimalState) < 0) { throw BeanManagerLogger.LOG.methodNotAvailableDuringInitialization(methodName, state); } }
public static boolean available(String contextId) { return isSet(contextId) && instance(contextId).getState().isAvailable(); }
@Override public BeanManagerProxy getBeanManager() { ContainerState state = container.getState(); if (state.equals(ContainerState.STOPPED) || state.equals(ContainerState.SHUTDOWN)) { throw BeanManagerLogger.LOG.beanManagerNotAvailable(); } return beanManagers.getValue(getCallingClassName()); }
public void addInjectionTargetToBeInitialized(InjectionTargetInitializationContext<?> initializationContext) { if (container.getState().equals(ContainerState.VALIDATED) || container.getState().equals(ContainerState.INITIALIZED)) { // initialize now and don't store for later initialization as this has been created at runtime initializationContext.initialize(); } else { injectionTargetsToInitialize.add(initializationContext); } }
/** * When in portable mode (default) this method verifies that the container has reached the specified minimal state. * If it hasn't, an {@link IllegalStateException} is thrown. When in non-portable mode this method is no-op. * * @param methodName * @param minimalState the minimal state * @throws IllegalStateException If the application initialization is not finished yet */ private void checkContainerState(String methodName, ContainerState minimalState) { if (nonPortableMode) { return; } if (this.container == null) { this.container = Container.instance(manager); } ContainerState state = container.getState(); if (SHUTDOWN.equals(state)) { throw BeanManagerLogger.LOG.methodNotAvailableAfterShutdown(methodName); } if (state.compareTo(minimalState) < 0) { throw BeanManagerLogger.LOG.methodNotAvailableDuringInitialization(methodName, state); } }
public static boolean available(String contextId) { return isSet(contextId) && instance(contextId).getState().isAvailable(); }