Codota Logo
WeldInstanceFactory
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
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

  • Parsing JSON documents to java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • getExternalFilesDir (Context)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now