Examples of HandlerManager


Examples of com.google.gwt.gen2.event.shared.HandlerManager

  }

  public void testKeyEvents() {

    final Flag flag = new Flag();
    manager = new HandlerManager(flag);
    HandlerRegistration downRegistration = manager.addHandler(
        KeyDownEvent.TYPE, new KeyDownHandler() {
          public void onKeyDown(KeyDownEvent event) {
            flag.flag = true;
          }
View Full Code Here

Examples of com.thoughtworks.acceptance.someobjects.HandlerManager

                "      </protocol>  " +
                "    </handler>" +
                "  </handlers>" +
                "</handlerManager>";

        HandlerManager hm = (HandlerManager) xstream.fromXML(xml);
        Handler h = (Handler) hm.getHandlers().get(0);
        Protocol p = h.getProtocol();
        assertEquals("foo", p.getId());
    }
View Full Code Here

Examples of org.apache.felix.ipojo.HandlerManager

        if (imp == null) {
            // Add the missing requirement
            ServiceDependencyHandler handler = (ServiceDependencyHandler) getHandler(HandlerFactory.IPOJO_NAMESPACE + ":subservice");
            if (handler == null) {
                // Look for the ServiceDependencyHandler factory
                HandlerManager handlerManager = null;
                try {
                    ServiceReference[] refs = m_context.getServiceReferences(Factory.class.getName(), "(&(handler.name=subservice)(handler.namespace=" + HandlerFactory.IPOJO_NAMESPACE + ")(handler.type=composite))");
                    Factory factory = (Factory) m_context.getService(refs[0]);
                    handlerManager = (HandlerManager) factory.createComponentInstance(null, getCompositeManager().getServiceContext());
                } catch (InvalidSyntaxException e) {
                    // Should not happen
                } catch (UnacceptableConfiguration e) {
                    // Should not happen
                } catch (MissingHandlerException e) {
                    // Should not happen
                } catch (ConfigurationException e) {
                    // Should not happen
                }
               
                // Add the required handler
                try {
                    handlerManager.init(getCompositeManager(), new Element("composite", ""), new Properties());
                } catch (ConfigurationException e) {
                    error("Internal error : cannot configure the Import Handler : " + e.getMessage());
                    throw new CompositionException("Internal error : cannot configure the Import Handler", e);
                }
                handler = (ServiceDependencyHandler) handlerManager.getHandler();
                getCompositeManager().addCompositeHandler(handlerManager);
            }

            String spec = elem.getAttribute("specification");
            String filter = "(&(objectClass=" + spec + ")(!(instance.name=" + getCompositeManager().getInstanceName() + ")))"; // Cannot import yourself
View Full Code Here

Examples of org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager

    }

    public static void registerRegistryUsagePersistingListener(RegistryContext registryContext)
            throws RegistryException {
        HandlerManager handlerManager = registryContext.getHandlerManager();
        RegistryUsagePersistingListener handler = new RegistryUsagePersistingListener();
        URLMatcher anyUrlMatcher = new URLMatcher();
        anyUrlMatcher.setPattern(".*");
        String[] applyingFilters = new String[]{
                Filter.PUT, Filter.IMPORT, Filter.GET, Filter.DUMP, Filter.RESTORE,};

        handlerManager.addHandlerWithPriority(applyingFilters, anyUrlMatcher, handler,
                HandlerLifecycleManager.DEFAULT_REPORTING_HANDLER_PHASE);
    }
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.