Tabnine Logo
WeldInstanceFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
WeldInstanceFactory
in
org.jboss.weld.environment.undertow

Best Java code snippets using org.jboss.weld.environment.undertow.WeldInstanceFactory (Showing top 6 results out of 315)

origin: weld/core

static <T> WeldInstanceFactory<T> of(InstanceFactory<T> delegate, ServletContext context, Class<?> clazz) {
  return new WeldInstanceFactory<T>(delegate, context, Reflections.<Class<T>> cast(clazz));
}
origin: weld/core

  @Override
  public void handleDeployment(DeploymentInfo deploymentInfo, ServletContext servletContext) {
    // Servlet injection
    for (ServletInfo servlet : deploymentInfo.getServlets().values()) {
      UndertowLogger.LOG.installingCdiSupport(servlet.getServletClass());
      servlet.setInstanceFactory(WeldInstanceFactory.of(servlet.getInstanceFactory(), servletContext, servlet.getServletClass()));
    }
    try {
      // Filter injection
      for (FilterInfo filter : deploymentInfo.getFilters().values()) {
        UndertowLogger.LOG.installingCdiSupport(filter.getFilterClass());
        filter.setInstanceFactory(WeldInstanceFactory.of(filter.getInstanceFactory(), servletContext, filter.getFilterClass()));
      }
      // Listener injection
      for (ListenerInfo listener : deploymentInfo.getListeners()) {
        UndertowLogger.LOG.installingCdiSupport(listener.getListenerClass());
        listener.setInstanceFactory(WeldInstanceFactory.of(listener.getInstanceFactory(), servletContext, listener.getListenerClass()));
      }
      servletContext.setAttribute(INSTALLED, INSTALLED_FULL);
    } catch (NoSuchMethodError e) {
      // Undertow 1.2 and older does not have setInstanceFactory() on listeners/filters
      servletContext.setAttribute(INSTALLED, INSTALLED_SERVLET);
      return;
    }
  }
}
origin: org.jboss.weld.servlet/weld-servlet-shaded

  @Override
  public void handleDeployment(DeploymentInfo deploymentInfo, ServletContext servletContext) {
    // Servlet injection
    for (ServletInfo servlet : deploymentInfo.getServlets().values()) {
      UndertowLogger.LOG.installingCdiSupport(servlet.getServletClass());
      servlet.setInstanceFactory(WeldInstanceFactory.of(servlet.getInstanceFactory(), servletContext, servlet.getServletClass()));
    }
    try {
      // Filter injection
      for (FilterInfo filter : deploymentInfo.getFilters().values()) {
        UndertowLogger.LOG.installingCdiSupport(filter.getFilterClass());
        filter.setInstanceFactory(WeldInstanceFactory.of(filter.getInstanceFactory(), servletContext, filter.getFilterClass()));
      }
      // Listener injection
      for (ListenerInfo listener : deploymentInfo.getListeners()) {
        UndertowLogger.LOG.installingCdiSupport(listener.getListenerClass());
        listener.setInstanceFactory(WeldInstanceFactory.of(listener.getInstanceFactory(), servletContext, listener.getListenerClass()));
      }
      servletContext.setAttribute(INSTALLED, INSTALLED_FULL);
    } catch (NoSuchMethodError e) {
      // Undertow 1.2 and older does not have setInstanceFactory() on listeners/filters
      servletContext.setAttribute(INSTALLED, INSTALLED_SERVLET);
      return;
    }
  }
}
origin: weld/core

static <T> WeldInstanceFactory<T> of(InstanceFactory<T> delegate, ServletContext context, Class<?> clazz) {
  return new WeldInstanceFactory<T>(delegate, context, Reflections.<Class<T>> cast(clazz));
}
origin: weld/core

  @Override
  public void handleDeployment(DeploymentInfo deploymentInfo, ServletContext servletContext) {
    // Servlet injection
    for (ServletInfo servlet : deploymentInfo.getServlets().values()) {
      UndertowLogger.LOG.installingCdiSupport(servlet.getServletClass());
      servlet.setInstanceFactory(WeldInstanceFactory.of(servlet.getInstanceFactory(), servletContext, servlet.getServletClass()));
    }
    try {
      // Filter injection
      for (FilterInfo filter : deploymentInfo.getFilters().values()) {
        UndertowLogger.LOG.installingCdiSupport(filter.getFilterClass());
        filter.setInstanceFactory(WeldInstanceFactory.of(filter.getInstanceFactory(), servletContext, filter.getFilterClass()));
      }
      // Listener injection
      for (ListenerInfo listener : deploymentInfo.getListeners()) {
        UndertowLogger.LOG.installingCdiSupport(listener.getListenerClass());
        listener.setInstanceFactory(WeldInstanceFactory.of(listener.getInstanceFactory(), servletContext, listener.getListenerClass()));
      }
      servletContext.setAttribute(INSTALLED, INSTALLED_FULL);
    } catch (NoSuchMethodError e) {
      // Undertow 1.2 and older does not have setInstanceFactory() on listeners/filters
      servletContext.setAttribute(INSTALLED, INSTALLED_SERVLET);
      return;
    }
  }
}
origin: org.jboss.weld.servlet/weld-servlet-shaded

static <T> WeldInstanceFactory<T> of(InstanceFactory<T> delegate, ServletContext context, Class<?> clazz) {
  return new WeldInstanceFactory<T>(delegate, context, Reflections.<Class<T>> cast(clazz));
}
org.jboss.weld.environment.undertowWeldInstanceFactory

Javadoc

InstanceFactory implementation that uses CDI's Unmanaged internally to obtain Weld-managed instances.

Most used methods

  • <init>
  • of

Popular in Java

  • Making http requests using okhttp
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • runOnUiThread (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now