Package com.google.inject

Examples of com.google.inject.Stage


    Injector injector;

    String injectorContextAttribute = filter.getFilterConfig().getInitParameter(
      "injectorContextAttribute");

    Stage stage = null;

    String stageContextAttribute = filter.getFilterConfig().getInitParameter(STAGE_PARAMETER);
    if (stageContextAttribute == null)
    {
      stageContextAttribute = filter.getFilterConfig()
View Full Code Here


   */
  public static void initialize(Module... modules) {
    if (injector == null) {
      try {
        logger.info("--- Para.initialize() [{}] ---", Config.ENVIRONMENT);
        Stage stage = Config.IN_PRODUCTION ? Stage.PRODUCTION : Stage.DEVELOPMENT;
        List<Module> coreModules = getCoreModules();
        List<Module> externalModules = getExternalModules(modules);

        if (!externalModules.isEmpty()) {
          injector = Guice.createInjector(stage, Modules.override(coreModules).with(externalModules));
View Full Code Here

      final ServletContext context = event.getServletContext();
      final Registry registry = (Registry) context.getAttribute(Registry.class.getName());
      final ResteasyProviderFactory providerFactory = (ResteasyProviderFactory) context.getAttribute(ResteasyProviderFactory.class.getName());
      final ModuleProcessor processor = new ModuleProcessor(registry, providerFactory);
      final List<? extends Module> modules = getModules(context);
      final Stage stage = getStage(context);
      Injector injector;

      if (parentInjector != null) {
         injector = parentInjector.createChildInjector(modules);
      } else {
View Full Code Here

    @Override
    public void contextInitialized(final ServletContextEvent event) {
        super.contextInitialized(event);
        final ServletContext context = event.getServletContext();
        final List<Module> modules = getModules(context);
        final Stage stage = getStage(context);
        try {
            processInjector(context, getInjector(stage, modules));
        }
        catch (Exception e) {
            log.error("Could not create Guice injector.", e);
View Full Code Here

    public void contextInitialized(final ServletContextEvent event) {
        super.contextInitialized(event);
        final ServletContext context = event.getServletContext();
        final List<Module> modules = getModules(context);
        log.debug("modules retrieved");
        final Stage stage = getStage(context);
        log.debug("Processing injector");
        processInjector(context, getInjector(stage, modules));
        log.debug("Returned from process injector");
    }
View Full Code Here

   */
  public static void initialize(Module... modules) {
    if (injector == null) {
      try {
        logger.info("--- Para.initialize() [{}] ---", Config.ENVIRONMENT);
        Stage stage = Config.IN_PRODUCTION ? Stage.PRODUCTION : Stage.DEVELOPMENT;
        List<Module> coreModules = getCoreModules();
        List<Module> externalModules = getExternalModules(modules);

        if (!externalModules.isEmpty()) {
          injector = Guice.createInjector(stage, Modules.override(coreModules).with(externalModules));
View Full Code Here

   */
  public static void initialize(Module... modules) {
    if (injector == null) {
      try {
        logger.info("--- Para.initialize() ---");
        Stage stage = Config.IN_PRODUCTION ? Stage.PRODUCTION : Stage.DEVELOPMENT;
        List<Module> coreModules = getCoreModules();
        List<Module> externalModules = getExternalModules(modules);

        if (!externalModules.isEmpty()) {
          injector = Guice.createInjector(stage, Modules.override(coreModules).with(externalModules));
View Full Code Here

   */
  public static void initialize(Module... modules) {
    if (injector == null) {
      try {
        logger.info("--- Para.initialize() [{}] ---", Config.ENVIRONMENT);
        Stage stage = Config.IN_PRODUCTION ? Stage.PRODUCTION : Stage.DEVELOPMENT;
        List<Module> coreModules = getCoreModules();
        List<Module> externalModules = getExternalModules(modules);

        if (!externalModules.isEmpty()) {
          injector = Guice.createInjector(stage, Modules.override(coreModules).with(externalModules));
View Full Code Here

   *
   * @param launchConfig The launch config of the server
   * @return a transformer that can build an injector from a module
   */
  public static Function<Module, Injector> newInjectorFactory(final LaunchConfig launchConfig) {
    final Stage stage = launchConfig.isDevelopment() ? Stage.DEVELOPMENT : Stage.PRODUCTION;
    return from -> from == null ? createInjector(stage) : createInjector(stage, from);
  }
View Full Code Here

    Injector injector;

    String injectorContextAttribute = filter.getFilterConfig().getInitParameter(
      "injectorContextAttribute");

    Stage stage = null;

    String stageContextAttribute = filter.getFilterConfig().getInitParameter(STAGE_PARAMETER);
    if (stageContextAttribute == null)
    {
      stageContextAttribute = filter.getFilterConfig()
View Full Code Here

TOP

Related Classes of com.google.inject.Stage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.