Examples of removeComponent()


Examples of fr.neatmonster.nocheatplus.components.NoCheatPlusAPI.removeComponent()

    // Set some things from the global config.
    final ConfigFile config = ConfigManager.getConfigFile();
    final NoCheatPlusAPI api = NCPAPIProvider.getNoCheatPlusAPI();
    if (engine != null) {
      engine.clear();
      api.removeComponent(engine);
    }
    engine = new LetterEngine(config);
    api.addComponent(engine);
  }
View Full Code Here

Examples of fr.neatmonster.nocheatplus.components.NoCheatPlusAPI.removeComponent()

    final ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
    final NoCheatPlusAPI api = NCPAPIProvider.getNoCheatPlusAPI();
    for (PacketAdapter adapter : registeredPacketAdapters) {
      try {
        protocolManager.removePacketListener(adapter);
        api.removeComponent(adapter); // Bit heavy, but consistent.
      } catch (Throwable t) {
        LogUtil.logWarning("[NoCheatPlus] Failed to unregister packet level hook: " + adapter.getClass().getName());
      }
    }
    registeredPacketAdapters.clear();
View Full Code Here

Examples of framework.component.ParentComponent.removeComponent()

    }, "MousePressed", null);
   
    EventSystem.getInstance().registerEventListener(new EventListener() {
      @Override
      public void onEvent(Event e) {
        p1.removeComponent(spin);
      }
     
      @Override
      public int getUniqueID() {
        return 1;
View Full Code Here

Examples of org.apache.camel.CamelContext.removeComponent()

        context.start();

        Component log = new LogComponent();
        context.addComponent("log", log);
        context.addEndpoint("log:/foo", log.createEndpoint("log://foo"));
        context.removeComponent("log");
        context.stop();

        List<String> expectedEvents = Arrays.asList("onContextStart", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd",
                                                    "onServiceAdd", "onComponentAdd", "onEndpointAdd", "onComponentRemove", "onContextStop");
       
View Full Code Here

Examples of org.apache.camel.CamelContext.removeComponent()

        context.start();

        Component log = new LogComponent();
        context.addComponent("log", log);
        context.addEndpoint("log:/foo", log.createEndpoint("log://foo"));
        context.removeComponent("log");
        context.stop();

        List<String> expectedEvents = Arrays.asList("onContextStart", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd",
                                                    "onServiceAdd", "onServiceAdd", "onComponentAdd", "onEndpointAdd", "onComponentRemove", "onContextStop");
       
View Full Code Here

Examples of org.apache.camel.CamelContext.removeComponent()

        context.start();

        Component log = new LogComponent();
        context.addComponent("log", log);
        context.addEndpoint("log:/foo", log.createEndpoint("log://foo"));
        context.removeComponent("log");
        context.stop();

        List<String> expectedEvents = Arrays.asList("onServiceAdd", "onThreadPoolAdd", "onContextStart", "onServiceAdd",
                "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd",
                "onThreadPoolAdd", "onComponentAdd", "onEndpointAdd", "onComponentRemove", "onThreadPoolAdd", "onContextStop");
View Full Code Here

Examples of org.apache.camel.CamelContext.removeComponent()

        context.start();

        Component log = new LogComponent();
        context.addComponent("log", log);
        context.addEndpoint("log:/foo", log.createEndpoint("log://foo"));
        context.removeComponent("log");
        context.stop();

        List<String> expectedEvents = Arrays.asList("onThreadPoolAdd", "onContextStart", "onServiceAdd", "onServiceAdd",
                "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd",
                "onThreadPoolAdd", "onComponentAdd", "onEndpointAdd", "onComponentRemove", "onContextStop");
View Full Code Here

Examples of org.apache.camel.CamelContext.removeComponent()

        Component log = new LogComponent();
        context.addComponent("log", log);

        context.addEndpoint("log:/foo", log.createEndpoint("log://foo"));

        context.removeComponent("log");

        context.stop();

        assertEquals(10, dummy1.getEvents().size());
        assertEquals(10, dummy2.getEvents().size());
View Full Code Here

Examples of org.apache.camel.CamelContext.removeComponent()

        context.start();

        Component log = new LogComponent();
        context.addComponent("log", log);
        context.addEndpoint("log:/foo", log.createEndpoint("log://foo"));
        context.removeComponent("log");
        context.stop();

        List<String> expectedEvents = Arrays.asList("onContextStart", "onServiceAdd", "onServiceAdd", "onServiceAdd",
                "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onThreadPoolAdd", "onThreadPoolAdd",
                "onComponentAdd", "onEndpointAdd", "onComponentRemove", "onContextStop");
View Full Code Here

Examples of org.apache.openejb.loader.SystemInstance.removeComponent()

            final TimerExecutor te = systemInstance.getComponent(TimerExecutor.class);
            if (te != null) {
                if (te.executor == executor) {
                    if (te.decr()) {
                        doShutdownExecutor(waitForJobsToComplete);
                        systemInstance.removeComponent(TimerExecutor.class);
                    } else { // flush jobs, maybe not all dedicated to this threadpool if shared but shouldn't be an issue
                        final ThreadPoolExecutor tpe = ThreadPoolExecutor.class.cast(executor);
                        if (waitForJobsToComplete) {
                            final Collection<Runnable> jobs = new ArrayList<>();
                            tpe.getQueue().drainTo(jobs);
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.