Examples of HandlerFactory


Examples of org.apache.droids.helper.factories.HandlerFactory

    defaultURLFilter.setFile("classpath:/regex-urlfilter.txt");
    filtersFactory.setMap(new HashMap<String, Object>());
    filtersFactory.getMap().put("default", defaultURLFilter);
   
    // Create handler factory. Provide sysout handler only.
    HandlerFactory handlerFactory = new HandlerFactory();
    SysoutHandler defaultHandler = new SysoutHandler();
    handlerFactory.setMap(new HashMap<String, Object>());
    handlerFactory.getMap().put("default", defaultHandler);
   
    // Create droid factory. Leave it empty for now.
    DroidFactory<Link> droidFactory = new DroidFactory<Link>();
    droidFactory.setMap(new HashMap<String, Object>());
   
View Full Code Here

Examples of org.apache.droids.helper.factories.HandlerFactory

    filtersFactory.getMap().put("default", defaultURLFilter);
    return filtersFactory;
  }
 
  public static HandlerFactory createDefaultHandlerFactory(Handler defaultHandler) {
    HandlerFactory handlerFactory = new HandlerFactory();
    handlerFactory.setMap(new HashMap<String, Object>());
    handlerFactory.getMap().put("default", defaultHandler);
    return handlerFactory;
  }
View Full Code Here

Examples of org.apache.droids.helper.factories.HandlerFactory

    filtersFactory.getMap().put("default", defaultURLFilter);
    return filtersFactory;
  }
 
  public static HandlerFactory createDefaultHandlerFactory(Handler defaultHandler) {
    HandlerFactory handlerFactory = new HandlerFactory();
    handlerFactory.getMap().put("default", defaultHandler);
    return handlerFactory;
  }
View Full Code Here

Examples of org.apache.droids.helper.factories.HandlerFactory

    RegexURLFilter defaultURLFilter = new RegexURLFilter();
    defaultURLFilter.setFile("classpath:/regex-urlfilter.txt");
    filtersFactory.getMap().put("default", defaultURLFilter);
   
    // Create handler factory. Provide sysout handler only.
    HandlerFactory handlerFactory = new HandlerFactory();
    SysoutHandler defaultHandler = new SysoutHandler();
    handlerFactory.getMap().put("default", defaultHandler);
   
    // Create droid factory. Leave it empty for now.
    DroidFactory<Link> droidFactory = new DroidFactory<Link>();
   
    // Create default droid
View Full Code Here

Examples of org.apache.felix.ipojo.HandlerFactory

     * @param name : class name of the handler to find
     * @return : the handler, or null if not found
     */
    public CompositeHandler getCompositeHandler(String name) {
        for (int i = 0; i < m_handlers.length; i++) {
            HandlerFactory fact = (HandlerFactory) m_handlers[i].getFactory();
            if (fact.getHandlerName().equals(name) || name.equals(fact.getComponentDescription().getClassName())) {
                return (CompositeHandler) m_handlers[i].getHandler();
            }
        }
        return null;
    }
View Full Code Here

Examples of org.apache.felix.ipojo.HandlerFactory

    /**
     * Creates a handler description.
     * @param handler the handler.
     */
    public HandlerDescription(Handler handler) {
        HandlerFactory factory = (HandlerFactory) handler.getHandlerManager().getFactory();
        m_handlerName = factory.getHandlerName();
        m_handler = handler;
    }
View Full Code Here

Examples of org.apache.felix.ipojo.HandlerFactory

     * @param name : class name of the handler to find
     * @return : the handler, or null if not found
     */
    public CompositeHandler getCompositeHandler(String name) {
        for (int i = 0; i < m_handlers.length; i++) {
            HandlerFactory fact = (HandlerFactory) m_handlers[i].getFactory();
            if (fact.getHandlerName().equals(name) || fact.getComponentDescription().getClassName().equals(name)) {
                return (CompositeHandler) m_handlers[i].getHandler();
            }
        }
        return null;
    }
View Full Code Here

Examples of rabbit.handler.HandlerFactory

  for (String handler : handlersProps.keySet ()) {
      try {
    classname = handlersProps.getProperty (handler).trim ();
    Class<? extends HandlerFactory> cls =
        Class.forName (classname).asSubclass (HandlerFactory.class);
    HandlerFactory hf = cls.newInstance ();
    hf.setup (log, config.getProperties (classname));
    hhandlers.put (handler, hf);
      } catch (ClassNotFoundException ex) {
    log.logError ( "Could not load class: '" + classname +
             "' for handlerfactory '" + handler + "'");
      } catch (InstantiationException ie) {
View Full Code Here

Examples of ratpack.launch.HandlerFactory

  private static Function<Stopper, ChannelInitializer<SocketChannel>> buildChannelInitializer(final LaunchConfig launchConfig) {
    return stopper -> new RatpackChannelInitializer(launchConfig, createHandler(launchConfig), stopper);
  }

  private static Handler createHandler(final LaunchConfig launchConfig) {
    final HandlerFactory handlerFactory = launchConfig.getHandlerFactory();

    if (launchConfig.isDevelopment()) {
      File classFile = ClassUtil.getClassFile(handlerFactory);
      if (classFile != null) {
        Factory<Handler> factory = new ReloadableFileBackedFactory<>(classFile.toPath(), true, (file, bytes) -> createHandler(launchConfig, handlerFactory));
View Full Code Here

Examples of ratpack.launch.HandlerFactory

      List<String> compressionMimeTypeBlackList = props.asList(COMPRESSION_MIME_TYPE_BLACK_LIST);

      Map<String, String> otherProperties = Maps.newHashMap();
      PropertiesUtil.extractProperties("other.", properties, otherProperties);

      HandlerFactory handlerFactory;
      try {
        handlerFactory = handlerFactoryClass.newInstance();
      } catch (Exception e) {
        throw new LaunchException("Could not instantiate handler factory: " + handlerFactoryClass.getName(), e);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.