Examples of publishEvent()


Examples of org.axonframework.unitofwork.UnitOfWork.publishEvent()

        UnitOfWork uow = DefaultUnitOfWork.startAndGet();
        GenericEventMessage<Object> event = new GenericEventMessage<Object>("First",
                                                                            Collections.<String, Object>singletonMap(
                                                                                    "continue",
                                                                                    true));
        uow.publishEvent(event,
                         eventBus);
        verify(eventListener, never()).handle(isA(EventMessage.class));
        doAnswer(new Answer() {
            @Override
            public Object answer(InvocationOnMock invocation) throws Throwable {
View Full Code Here

Examples of org.rhq.core.pluginapi.event.EventContext.publishEvent()

        EventContext eventContext = resourceContext.getEventContext();

        for (int i = 0; i < count; ++i) {
            Event event = new Event(eventType, source, System.currentTimeMillis(), severity, details);
            eventContext.publishEvent(event);
        }

        result = new OperationResult("failed");
        return result;
    }
View Full Code Here

Examples of org.richfaces.application.push.Topic.publishEvent()

    public synchronized void destroy() {
        active = false;

        for (TopicKey key : successfulSubscriptions) {
            Topic topic = topicsContext.getTopic(key);
            topic.publishEvent(new SessionUnsubscriptionEvent(topic, key, this));
        }

        try {
            disconnect();
        } catch (Exception e) {
View Full Code Here

Examples of org.richfaces.application.push.Topic.publishEvent()

            }

            if (errorMessage != null) {
                failedSubscriptions.put(topicKey, errorMessage);
            } else {
                pushTopic.publishEvent(new SessionSubscriptionEvent(pushTopic, topicKey, this));
                successfulSubscriptions.add(topicKey);
            }
        }
    }
View Full Code Here

Examples of org.springframework.context.ApplicationContext.publishEvent()

            {
                dspaceContext.abort();
            }
            if (context != null)
            {
                context.publishEvent(new ContextClosedEvent(context));
            }
        }
        log.info("#### END: -----" + new Date() + " ----- ####");
        System.exit(0);
    }
View Full Code Here

Examples of org.springframework.context.ApplicationContext.publishEvent()

        // Commit the successful Authentication object to the secure
        // ContextHolder
        SecurityContextHolder.getContext().setAuthentication(result);

        // Fire application event to advise of new login
        appCtx.publishEvent(new LoginEvent(result));
    }

    public static Authentication logout() {
        Authentication existing = SecurityContextHolder.getContext().getAuthentication();
View Full Code Here

Examples of org.springframework.context.ApplicationContext.publishEvent()

            existing = ClientSecurityEvent.NO_AUTHENTICATION;
        }

        // Fire application event to advise of logout
        ApplicationContext appCtx = Application.instance().getApplicationContext();
        appCtx.publishEvent(new LogoutEvent(existing));

        return existing;
    }

}
View Full Code Here

Examples of org.springframework.context.ApplicationContext.publishEvent()

            result = authenticationManager.authenticate(request);
        } catch( SpringSecurityException e ) {
            logger.warn( "authentication failed", e);

            // Fire application event to advise of failed login
            appCtx.publishEvent( new AuthenticationFailedEvent(request, e));
           
            // And rethrow the exception to prevent the dialog from closing
            throw e;
        }
View Full Code Here

Examples of org.springframework.context.ApplicationEventPublisher.publishEvent()

        //Create the rendering lock for the user
        this.renderingLock = new Object();
       
        // Record the creation of the session
        final ApplicationEventPublisher applicationEventPublisher = EventPublisherLocator.getApplicationEventPublisher();
        applicationEventPublisher.publishEvent(new UserSessionCreatedPortalEvent(this, this.person));

        userSessions.incrementAndGet();
    }

   
View Full Code Here

Examples of org.springframework.context.support.AbstractApplicationContext.publishEvent()

    context.refresh();

    SamplePersonEventListener listener = new SamplePersonEventListener();
    context.addApplicationListener(listener);

    context.publishEvent(new BeforeConvertEvent<Person>(new Person("Dave", "Matthews")));
    assertThat(listener.invokedOnBeforeConvert, is(true));

    listener.invokedOnBeforeConvert = false;
    context.publishEvent(new BeforeConvertEvent<String>("Test"));
    assertThat(listener.invokedOnBeforeConvert, is(false));
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.