Examples of EventDescriptor


Examples of com.enernoc.open.oadr2.model.EventDescriptor

      .withOadrEvents( new OadrEvent()
        .withEiEvent(
          new EiEvent()
            .withEiTarget( new EiTarget()
                .withVenIDs("ven-1234") )
            .withEventDescriptor(new EventDescriptor()
                .withEventID("event-1234")
                .withModificationNumber(0)
                .withEventStatus(EventStatusEnumeratedType.FAR)
                .withPriority(1L)
                .withEiMarketContext(new EiMarketContext(
View Full Code Here

Examples of com.enernoc.open.oadr2.model.v20b.ei.EventDescriptor

          .withOadrEvents( new OadrEvent()
            .withEiEvent(
              new EiEvent()
                .withEiTarget( new EiTarget()
                    .withVenIDs("ven-1234") )
                .withEventDescriptor(new EventDescriptor()
                    .withEventID("event-1234")
                    .withModificationNumber(0)
                    .withEventStatus(EventStatusEnumeratedType.FAR)
                    .withPriority(1L)
                    .withEiMarketContext(new EiMarketContext(
View Full Code Here

Examples of org.rioproject.event.EventDescriptor

     * Helper method to return the EventDescriptor for this event
     *
     * @return The EventDescriptor for this event
     */
    public static EventDescriptor getEventDescriptor(){
        return(new EventDescriptor(ServiceLogEvent.class, ID));
    }
View Full Code Here

Examples of org.rioproject.event.EventDescriptor

        java.util.Random rand = new java.util.Random(System.currentTimeMillis());
        long randomNumber = rand.nextLong();
        myPeerInfo = new ProvisionMonitor.PeerInfo(getServiceProxy(),
                                                   randomNumber,
                                                   computeResource.getAddress().getHostAddress());
        eventConsumer = new BasicEventConsumer(new EventDescriptor(ProvisionMonitorEvent.class,
                                                                   ProvisionMonitorEvent.ID),
                                               this,
                                               config);
        template = new ServiceTemplate(null, new Class[] {ProvisionMonitor.class}, null);
        new Thread(this).start();
View Full Code Here

Examples of org.rioproject.event.EventDescriptor

            ProvisionMonitorEventProcessor eventProcessor = new ProvisionMonitorEventProcessor(config);
            provisionWatch = new GaugeWatch("Provision Clock", config);
            getWatchRegistry().register(provisionWatch);

            /* Wire up event handlers for the ProvisionMonitorEvent and the ProvisionFailureEvent */
            EventDescriptor clientEventDesc = ProvisionMonitorEvent.getEventDescriptor();
            getEventTable().put(clientEventDesc.eventID, eventProcessor.getMonitorEventHandler());

            EventDescriptor failureEventDesc = ProvisionFailureEvent.getEventDescriptor();
            /* EventHandler for ProvisionFailureEvent consumers */
            EventHandler failureHandler = new DispatchEventHandler(failureEventDesc, config);
            getEventTable().put(failureEventDesc.eventID, failureHandler);

            registerEventAdapters();
View Full Code Here

Examples of org.rioproject.event.EventDescriptor

        return deployAdmin;
    }

    private void registerEventAdapters() throws LeaseDeniedException, UnknownEventException, RemoteException {
        // translate ProvisionFailureEvents to notifications
        EventDescriptor provisionFailureEventDescriptor = new EventDescriptor(ProvisionFailureEvent.class,
                                                                              ProvisionFailureEvent.ID);
        ProvisionFailureEventAdapter provisionFailureEventAdapter =
            new ProvisionFailureEventAdapter(objectName, getNotificationBroadcasterSupport());
        register(provisionFailureEventDescriptor, provisionFailureEventAdapter, null, Long.MAX_VALUE);

        // register notification info
        mbeanNoticationInfoList.add(provisionFailureEventAdapter.getNotificationInfo());

        // translate ProvisionMonitorEvents to notifications
        EventDescriptor provisionMonitorEventDescriptor = new EventDescriptor(ProvisionMonitorEvent.class,
                                                                              ProvisionMonitorEvent.ID
        );
        ProvisionMonitorEventAdapter provisionMonitorEventAdapter =
            new ProvisionMonitorEventAdapter(objectName, getNotificationBroadcasterSupport());
View Full Code Here

Examples of org.rioproject.event.EventDescriptor

    @Test
    public void testSLAThresholdEventNotification() {
        Assert.assertNotNull(testManager);
        SLAThresholdEventProducer service =
            (SLAThresholdEventProducer)testManager.waitForService(SLAThresholdEventProducer.class);
        EventDescriptor eDesc = SLAThresholdEvent.getEventDescriptor();
        Assert.assertNotNull(service);
        DynamicEventConsumer eventConsumer = null;
        Throwable t = null;
        try {
            eventConsumer = new DynamicEventConsumer(eDesc,
View Full Code Here

Examples of org.rioproject.event.EventDescriptor

        /*
         * Create an EventDescriptor for the SLAThresholdEvent and add it as an
         * attribute. Create a DispatchEventHandler to handle the sending of
         * SLAThresholdEvents
         */
        EventDescriptor slaEventDesc = SLAThresholdEvent.getEventDescriptor();
        slaEventHandler = new DispatchEventHandler(slaEventDesc, config);
        getEventTable().put(slaEventDesc.eventID, slaEventHandler);
        addAttribute(slaEventDesc);

        ServiceLogEventHandler appender = ServiceLogEventHandlerHelper.findInstance();
View Full Code Here

Examples of org.rioproject.event.EventDescriptor

     * @throws IOException
     */
    private void applyServiceLogEventHandlerProperties(final ServiceLogEventHandler s, final Configuration config)
        throws IOException {
        if(s.getServiceLogEventPublisher()==null) {
            EventDescriptor serviceLogEventDescriptor = ServiceLogEvent.getEventDescriptor();
            EventHandler serviceLogEventHandler = new DispatchEventHandler(serviceLogEventDescriptor, config);
            getEventTable().put(serviceLogEventDescriptor.eventID, serviceLogEventHandler);
            ServiceLogEventPublisherImpl publisher = new ServiceLogEventPublisherImpl(serviceLogEventHandler,
                                                                                      (EventProducer)getExportedProxy());
            s.setServiceLogEventPublisher(publisher);
View Full Code Here

Examples of org.rioproject.event.EventDescriptor

        thresholdTaskPool = Executors.newCachedThreadPool();
        /*
         * Create event descriptor for the SLAThresholdEvent and add it as
         * an attribute
         */
        EventDescriptor thresholdEventDesc = SLAThresholdEvent.getEventDescriptor();
        getEventTable().put(thresholdEventDesc.eventID, getSLAEventHandler());
        addAttribute(thresholdEventDesc);       

        addAttribute(new BasicStatus(StatusType.NORMAL));

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.