Examples of addEventListener()


Examples of org.araneaframework.template.framework.container.StandardWizardWidget.addEventListener()

      company.setCompany(contract.getCompany());
      person.setPerson(contract.getPerson());
      notes.setNotes(contract.getNotes());
    }
   
    wizard.addEventListener(new WizardContext.EventListener() {
      public void onGoto(Widget page) throws Exception {}     
      public void onSubmit() throws Exception {
        log.debug("Event 'save' received!");
        if (validate()) {
          ContractMO contract = id != null ? (ContractMO) getGeneralDAO().getById(ContractMO.class, id) : new ContractMO();
View Full Code Here

Examples of org.asteriskjava.manager.ManagerConnection.addEventListener()

        ManagerConnection connection;
        AsyncAgiServer agiServer;

        connection = new DefaultManagerConnection("localhost", "manager", "obelisk");
        agiServer = new AsyncAgiServer(new GetDataScript());
        connection.addEventListener(agiServer);
        connection.login();

        while (true)
        {
            Thread.sleep(1000L);
View Full Code Here

Examples of org.atmosphere.cpr.AtmosphereEventLifecycle.addEventListener()

    public void suspend(int timeout) throws IOException {
        if (!suspended) {
            atmResource.setSerializer(serializer);
            if (atmResource instanceof AtmosphereEventLifecycle) {
                AtmosphereEventLifecycle ael = (AtmosphereEventLifecycle)atmResource;
                ael.addEventListener(eventListener);
            }
            writer.suspend();
            atmResource.suspend(timeout, false);
        }
    }
View Full Code Here

Examples of org.atmosphere.cpr.AtmosphereResource.addEventListener()

        boolean ok = true;
        AtmosphereResource resource = req.resource();
        if (resource != null) {
            try {
                resource.addEventListener(new OnResume() {
                    @Override
                    public void onResume(AtmosphereResourceEvent event) {
                        latch.countDown();
                    }
                });
View Full Code Here

Examples of org.atmosphere.cpr.AtmosphereResourceImpl.addEventListener()

                            if (resource != null) {
                                resource.getRequest().setAttribute(SocketIOAtmosphereHandler.SOCKETIO_SESSION_ID, session.getSessionId());
                                resource.getRequest().setAttribute(SocketIOAtmosphereHandler.SOCKETIO_SESSION_OUTBOUND, session.getTransportHandler());
                                session.setAtmosphereResourceImpl(resource);

                                resource.addEventListener(new AtmosphereResourceEventListenerAdapter() {
                                    @Override
                                    public void onResume(AtmosphereResourceEvent event) {
                                        if (event.isResumedOnTimeout()) {
                                            event.getResource().write(new SocketIOPacketImpl(PacketType.NOOP).toString());
                                        }
View Full Code Here

Examples of org.cipango.media.Player.addEventListener()

            return;
        }
        Player player = new Player(file.getAbsolutePath(),
                rtpConnection.getHost(), rtpConnection.getPort(),
                payloadType);
        player.addEventListener(this);
        try {
            player.init();
        } catch (Exception e) {
            SipServletResponse resp = invite.createResponse(
                    SipServletResponse.SC_SERVER_INTERNAL_ERROR);
View Full Code Here

Examples of org.drools.KnowledgeBase.addEventListener()

    @Test
    public void testKnowledgeBaseEventSupportLeak() throws Exception {
        // JBRULES-3666
        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
        KnowledgeBaseEventListener listener = new DefaultKnowledgeBaseEventListener();
        kbase.addEventListener(listener);
        kbase.addEventListener(listener);
        assertEquals(1, ((KnowledgeBaseImpl) kbase).getRuleBase().getRuleBaseEventListeners().size());
        kbase.removeEventListener(listener);
        assertEquals(0, ((KnowledgeBaseImpl) kbase).getRuleBase().getRuleBaseEventListeners().size());
    }
View Full Code Here

Examples of org.drools.StatefulSession.addEventListener()

        final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
        ruleBase.addPackage( builder.getPackage() );

        final StatefulSession session = ruleBase.newStatefulSession();

        session.addEventListener( new DefaultAgendaEventListener() {
            public void afterActivationFired(final AfterActivationFiredEvent arg0) {
                super.afterActivationFired( arg0,
                                            session );
            }
        } );
View Full Code Here

Examples of org.drools.WorkingMemory.addEventListener()

                                            WorkingMemory workingMemory) {
                activations.add( event.getActivation() );
            }
        };

        workingMemory.addEventListener( listener );
        DefaultAgenda agenda = (DefaultAgenda) workingMemory.getAgenda();
        assertEquals( 0,
                      agenda.getRuleFlowGroup( "flowgroup-1" ).size() );

        // We need to call fireAllRules here to get the InitialFact into the system, to the eval(true)'s kick in
View Full Code Here

Examples of org.drools.WorkingMemoryEventManager.addEventListener()

    }
   
    public WorkingMemoryLogger(final KnowledgeRuntimeEventManager session) {
        if (session instanceof StatefulKnowledgeSessionImpl) {
            WorkingMemoryEventManager eventManager = ((StatefulKnowledgeSessionImpl) session).session;
            eventManager.addEventListener( (WorkingMemoryEventListener) this );
            eventManager.addEventListener( (AgendaEventListener) this );
            eventManager.addEventListener( (RuleBaseEventListener) this );
            InternalProcessRuntime processRuntime = ((StatefulKnowledgeSessionImpl) session).session.getProcessRuntime();
            if (processRuntime != null) {
                processRuntime.addEventListener( (ProcessEventListener) this );
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.