Examples of ManagedService


Examples of com.hazelcast.spi.ManagedService

     * @param nodeEngine node engine.
     * @return new map service object.
     */
    public static MapService create(NodeEngine nodeEngine) {
        final MapServiceContext mapServiceContext = new DefaultMapServiceContext(nodeEngine);
        final ManagedService managedService = new MapManagedService(mapServiceContext);
        final MigrationAwareService migrationAwareService = new MapMigrationAwareService(mapServiceContext);
        final TransactionalService transactionalService = new MapTransactionalService(mapServiceContext);
        final RemoteService remoteService = new MapRemoteService(mapServiceContext);
        final EventPublishingService eventPublisher = new MapEventPublishingService(mapServiceContext);
        final PostJoinAwareService postJoinAwareService = new MapPostJoinAwareService(mapServiceContext);
View Full Code Here

Examples of org.apache.camel.management.mbean.ManagedService

            // fallback as generic service
            answer = getManagementObjectStrategy().getManagedObjectForService(context, service);
        }

        if (answer != null && answer instanceof ManagedService) {
            ManagedService ms = (ManagedService) answer;
            ms.setRoute(route);
            ms.init(getManagementStrategy());
        }

        return answer;
    }
View Full Code Here

Examples of org.apache.camel.management.mbean.ManagedService

            // fallback as generic service
            answer = getManagementObjectStrategy().getManagedObjectForService(context, service);
        }

        if (answer != null && answer instanceof ManagedService) {
            ManagedService ms = (ManagedService) answer;
            ms.setRoute(route);
            ms.init(getManagementStrategy());
        }

        return answer;
    }
View Full Code Here

Examples of org.apache.camel.management.mbean.ManagedService

        mp.init(context.getManagementStrategy());
        return mp;
    }

    public Object getManagedObjectForService(CamelContext context, Service service) {
        ManagedService mc = new ManagedService(context, service);
        mc.init(context.getManagementStrategy());
        return mc;
    }
View Full Code Here

Examples of org.apache.camel.management.mbean.ManagedService

            // fallback as generic service
            answer = getManagementObjectStrategy().getManagedObjectForService(context, service);
        }

        if (answer != null && answer instanceof ManagedService) {
            ManagedService ms = (ManagedService) answer;
            ms.setRoute(route);
            ms.init(getManagementStrategy());
        }

        return answer;
    }
View Full Code Here

Examples of org.apache.camel.management.mbean.ManagedService

        }
    }

    @SuppressWarnings("unchecked")
    private Object getManagedObjectForService(CamelContext context, Service service, Route route) {
        ManagedService answer = null;

        if (service instanceof ManagementAware) {
            return ((ManagementAware) service).getManagedObject(service);
        } else if (service instanceof Tracer) {
            // special for tracer
            ManagedTracer mt = new ManagedTracer(context, (Tracer) service);
            mt.init(getManagementStrategy());
            return mt;
        } else if (service instanceof EventNotifier) {
            // special for event notifier
            ManagedEventNotifier men = new ManagedEventNotifier(context, (EventNotifier) service);
            men.init(getManagementStrategy());
            return men;           
        } else if (service instanceof Producer) {
            answer = new ManagedProducer(context, (Producer) service);
        } else if (service instanceof ScheduledPollConsumer) {
            answer = new ManagedScheduledPollConsumer(context, (ScheduledPollConsumer) service);
        } else if (service instanceof Consumer) {
            answer = new ManagedConsumer(context, (Consumer) service);
        } else if (service instanceof Processor) {
            // special for processors
            return getManagedObjectForProcessor(context, (Processor) service, route);
        } else if (service instanceof ThrottlingInflightRoutePolicy) {
            answer = new ManagedThrottlingInflightRoutePolicy(context, (ThrottlingInflightRoutePolicy) service);
        } else if (service instanceof ProducerCache) {
            answer = new ManagedProducerCache(context, (ProducerCache) service);
        } else if (service != null) {
            // fallback as generic service
            answer = new ManagedService(context, service);
        }

        if (answer != null) {
            answer.setRoute(route);
            answer.init(getManagementStrategy());
            return answer;
        } else {
            // not supported
            return null;
        }
View Full Code Here

Examples of org.atmosphere.config.service.ManagedService

    protected AnnotatedProxy proxyHandler() throws IllegalAccessException, InstantiationException {
        return config.framework().newClassInstance(AnnotatedProxy.class, ManagedAtmosphereHandler.class);
    }

    protected ManagedAnnotation managed(AnnotatedProxy ap, AtmosphereResource r){
        final ManagedService a = ap.target().getClass().getAnnotation(ManagedService.class);
        if (a == null) return null;

        return new ManagedAnnotation(){
            @Override
            public String path() {
                return a.path();
            }

            @Override
            public Class<? extends Broadcaster> broadcaster() {
                return a.broadcaster();
            }
        };
    }
View Full Code Here

Examples of org.osgi.service.cm.ManagedService

        this.jettyService = jettyService;
    }

    public Object getService(Bundle bundle, ServiceRegistration registration)
    {
        return new ManagedService()
        {
            public void updated(Dictionary properties)
            {
                jettyService.updated(properties);
            }
View Full Code Here

Examples of org.osgi.service.cm.ManagedService

    private void updateService( ServiceReference<ManagedService> service, final TargetedPID configPid,
        Dictionary<String, ?> properties, long revision, ConfigurationMap<?> configs)
    {
        // Get the ManagedService and terminate here if already
        // unregistered from the framework concurrently
        final ManagedService srv = this.getRealService( service );
        if (srv == null) {
            return;
        }

        // Get the Configuration-to-PID map from the parameter or from
View Full Code Here

Examples of org.osgi.service.cm.ManagedService

    private Object tryToCreateManagedService()
    {
        try
        {
            return new ManagedService()
            {
                @Override
                public void updated( Dictionary<String, ?> properties ) throws ConfigurationException
                {
                    updateFromConfigAdmin(properties);
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.