Package org.apache.stratos.messaging.broker.publish

Examples of org.apache.stratos.messaging.broker.publish.EventPublisher


        }
        publishEvent(completeTopologyEvent);
    }

    public static void publishEvent(Event event) {
        EventPublisher eventPublisher = EventPublisherPool.getPublisher(Constants.TOPOLOGY_TOPIC);
        eventPublisher.publish(event);
    }
View Full Code Here


                    CartridgeAgentConfiguration.getInstance().getClusterId(),
                    CartridgeAgentConfiguration.getInstance().getNetworkPartitionId(),
                    CartridgeAgentConfiguration.getInstance().getPartitionId(),
                    CartridgeAgentConfiguration.getInstance().getMemberId());

            EventPublisher eventPublisher = EventPublisherPool.getPublisher(Constants.INSTANCE_STATUS_TOPIC);
            eventPublisher.publish(event);
            setStarted(true);
            if (log.isInfoEnabled()) {
                log.info("Instance started event published");
            }
View Full Code Here

                    CartridgeAgentConfiguration.getInstance().getNetworkPartitionId(),
                    CartridgeAgentConfiguration.getInstance().getPartitionId(),
                    CartridgeAgentConfiguration.getInstance().getMemberId());

            // Event publisher connection will
            EventPublisher eventPublisher = EventPublisherPool.getPublisher(Constants.INSTANCE_STATUS_TOPIC);
            eventPublisher.publish(event);
            if (log.isInfoEnabled()) {
                log.info("Instance activated event published");
            }

            ExtensionUtils.executeInstanceActivatedExtension();
View Full Code Here

                    CartridgeAgentConfiguration.getInstance().getClusterId(),
                    CartridgeAgentConfiguration.getInstance().getNetworkPartitionId(),
                    CartridgeAgentConfiguration.getInstance().getPartitionId(),
                    CartridgeAgentConfiguration.getInstance().getMemberId());

            EventPublisher eventPublisher = EventPublisherPool.getPublisher(Constants.INSTANCE_STATUS_TOPIC);
            eventPublisher.publish(event);
            setReadyToShutdown(true);
            if (log.isInfoEnabled()) {
                log.info("Instance ReadyToShutDown event published");
            }
        } else {
View Full Code Here

                    CartridgeAgentConfiguration.getInstance().getClusterId(),
                    CartridgeAgentConfiguration.getInstance().getNetworkPartitionId(),
                    CartridgeAgentConfiguration.getInstance().getPartitionId(),
                    CartridgeAgentConfiguration.getInstance().getMemberId());

            EventPublisher eventPublisher = EventPublisherPool.getPublisher(Constants.INSTANCE_STATUS_TOPIC);
            eventPublisher.publish(event);
            setMaintenance(true);
            if (log.isInfoEnabled()) {
                log.info("Instance Maintenance mode event published");
            }
        } else {
View Full Code Here

        try {
            if(log.isInfoEnabled()) {
                log.info(String.format("Publishing tenant un-subscribed event: [tenant-id] %d [service] %s", tenantId, serviceName));
            }
            TenantUnSubscribedEvent event = new TenantUnSubscribedEvent(tenantId, serviceName);
            EventPublisher eventPublisher = EventPublisherPool.getPublisher(Constants.TENANT_TOPIC);
            eventPublisher.publish(event);
        } catch (Exception e) {
            if (log.isErrorEnabled()) {
                log.error(String.format("Could not publish tenant un-subscribed event: [tenant-id] %d [service] %s", tenantId, serviceName), e);
            }
        }
View Full Code Here

      try {
        if(log.isInfoEnabled()) {
          log.info(String.format("Publishing tenant subscribed event: [tenant-id] %d [service] %s", tenantId, serviceName));
        }
        TenantSubscribedEvent subscribedEvent = new TenantSubscribedEvent(tenantId, serviceName);
        EventPublisher eventPublisher = EventPublisherPool.getPublisher(Constants.TENANT_TOPIC);
        eventPublisher.publish(subscribedEvent);
      } catch (Exception e) {
        if (log.isErrorEnabled()) {
          log.error(String.format("Could not publish tenant subscribed event: [tenant-id] %d [service] %s", tenantId, serviceName), e);
        }
      }
View Full Code Here

                    }
                }
                tenants.add(tenant);
            }
            CompleteTenantEvent event = new CompleteTenantEvent(tenants);
            EventPublisher eventPublisher = EventPublisherPool.getPublisher(Constants.TENANT_TOPIC);
            eventPublisher.publish(event);
        } catch (Exception e) {
            if (log.isErrorEnabled()) {
                log.error("Could not publish complete tenant event", e);
            }
        }
View Full Code Here

                if(log.isDebugEnabled()) {
                    log.debug(String.format("Publishing tenant created event: [tenant-id] %d [tenant-domain] %s", tenantInfo.getTenantId(), tenantInfo.getTenantDomain()));
                }
                Tenant tenant = new Tenant(tenantInfo.getTenantId(), tenantInfo.getTenantDomain());
                TenantCreatedEvent event = new TenantCreatedEvent(tenant);
                EventPublisher eventPublisher = EventPublisherPool.getPublisher(Constants.TENANT_TOPIC);
                eventPublisher.publish(event);
            }
            catch (Exception e) {
                log.error("Could not publish tenant created event", e);
            }
        }
View Full Code Here

            try {
                if(log.isInfoEnabled()) {
                    log.info(String.format("Publishing tenant updated event: [tenant-id] %d [tenant-domain] %s", tenantInfo.getTenantId(), tenantInfo.getTenantDomain()));
                }
                TenantUpdatedEvent event = new TenantUpdatedEvent(tenantInfo.getTenantId(), tenantInfo.getTenantDomain());
                EventPublisher eventPublisher = EventPublisherPool.getPublisher(Constants.TENANT_TOPIC);
                eventPublisher.publish(event);
            }
            catch (Exception e) {
                log.error("Could not publish tenant updated event");
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.stratos.messaging.broker.publish.EventPublisher

Copyright © 2018 www.massapicom. 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.