Examples of registerService()


Examples of org.osgi.framework.BundleContext.registerService()

       
        final Semaphore sema = new Semaphore(0);
       
        BundleContext bc = c.createMock(BundleContext.class);
        ServiceRegistration sreg = c.createMock(ServiceRegistration.class);
        EasyMock.expect(bc.registerService((String)EasyMock.anyObject(), EasyMock.anyObject(), (Dictionary)EasyMock.anyObject())).andReturn(sreg).anyTimes();
        
       
        EndpointDescription epd = c.createMock(EndpointDescription.class);
        RemoteServiceAdmin rsa  = c.createMock(RemoteServiceAdmin.class);
        final ImportRegistration ireg = c.createMock(ImportRegistration.class);
View Full Code Here

Examples of org.osgi.framework.BundleContext.registerService()

        BundleContext bc = EasyMock.createNiceMock(BundleContext.class);
        TopologyManagerImport tm = EasyMock.createNiceMock(TopologyManagerImport.class);
        ServiceRegistration sr = EasyMock.createNiceMock(ServiceRegistration.class);
       
        // expect Listener registration
        EasyMock.expect(bc.registerService((String)EasyMock.anyObject(),EasyMock.anyObject() , (Dictionary)EasyMock.anyObject())).andReturn(sr).atLeastOnce();
       
       
        sr.setProperties((Dictionary)EasyMock.anyObject());
       
       
View Full Code Here

Examples of org.osgi.framework.BundleContext.registerService()

        BundleContext bc = c.createMock(BundleContext.class);
        ServiceRegistration sr = c.createMock(ServiceRegistration.class);

        EasyMock.expect(
                        bc.registerService(EasyMock.eq(ManagedService.class.getName()), EasyMock.eq(a),
                                           (Dictionary)EasyMock.anyObject())).andReturn(sr).once();
        sr.unregister();
        EasyMock.expectLastCall().once();

        c.replay();
View Full Code Here

Examples of org.osgi.framework.BundleContext.registerService()

        ServiceRegistration sreg = c.createMock(ServiceRegistration.class);
       
        EndpointListenerFactory eplf = new EndpointListenerFactory(zkd, ctx);

        EasyMock.expect(
                        ctx.registerService(EasyMock.eq(EndpointListener.class.getName()), EasyMock.eq(eplf),
                                            (Properties)EasyMock.anyObject())).andReturn(sreg).once();

       
        sreg.setProperties((Properties)EasyMock.anyObject());
        EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
View Full Code Here

Examples of org.osgi.framework.BundleContext.registerService()

        ServiceRegistration sreg = c.createMock(ServiceRegistration.class);
       
        EndpointListenerFactory eplf = new EndpointListenerFactory(zkd, ctx);

        EasyMock.expect(
                        ctx.registerService(EasyMock.eq(EndpointListener.class.getName()), EasyMock.eq(eplf),
                                            (Properties)EasyMock.anyObject())).andReturn(sreg).once();

       
        sreg.setProperties((Properties)EasyMock.anyObject());
        EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
View Full Code Here

Examples of org.osgi.framework.BundleContext.registerService()

       
        ServiceRegistration sreg = EasyMock.createMock(ServiceRegistration.class);
        BundleContext bc = EasyMock.createStrictMock(BundleContext.class);
        EasyMock.expect(bc.getDataFile(""))
            .andReturn(new File(System.getProperty("java.io.tmpdir")));
        EasyMock.expect(bc.registerService(
            EasyMock.eq(ManagedService.class.getName()), EasyMock.anyObject(), EasyMock.eq(props)))
                .andReturn(sreg);
        EasyMock.replay(bc);
        EasyMock.replay(sreg);
               
View Full Code Here

Examples of org.osgi.framework.BundleContext.registerService()

                            m_serviceSpecifications, bc)) {
                        serviceProperties = getServiceProperties();
                        m_strategy.onPublication(getInstanceManager(),
                                getServiceSpecificationsToRegister(),
                                serviceProperties);
                        m_serviceRegistration = bc.registerService(
                                getServiceSpecificationsToRegister(), this,
                                serviceProperties);
                        reg = m_serviceRegistration; // Stack confinement
                    } else {
                        throw new SecurityException("The bundle "
View Full Code Here

Examples of org.osgi.framework.BundleContext.registerService()

            try {
                m_objectName = new ObjectName(getObjectNameString());

                properties.put("jmxagent.objectName", m_objectName.toString());

                m_serviceRegistration = bundleContext.registerService(
                    javax.management.DynamicMBean.class.getName(), m_MBean,
                    properties);

                m_registered = true;
            } catch (Exception e) {
View Full Code Here

Examples of org.pentaho.platform.api.engine.IServiceManager.registerService()

    IServiceManager svcManager = PentahoSystem.get( IServiceManager.class, null );

    for ( PluginServiceDefinition pws : plugin.getServices() ) {
      for ( ServiceConfig ws : createServiceConfigs( pws, plugin, loader ) ) {
        try {
          svcManager.registerService( ws );
        } catch ( ServiceException e ) {
          throw new PlatformPluginRegistrationException( Messages.getInstance().getErrorString(
            "PluginManager.ERROR_0025_SERVICE_REGISTRATION_FAILED", ws.getId(), plugin.getId() ), e ); //$NON-NLS-1$
        }
      }
View Full Code Here

Examples of org.switchyard.MockDomain.registerService()

        MockDomain domain2 = new MockDomain(domain1.getServiceRegistry());

        ServiceReference referenceA = domain1.registerServiceReference(SERVICE_A, new InOnlyService());
        Service serviceA = domain1.registerService(SERVICE_A, new InOnlyService(), new MockHandler());
        domain2.registerServiceReference(SERVICE_B, new InOnlyService());
        domain2.registerService(SERVICE_B, new InOnlyService(), _provider);
       
        MockExchange ex = new MockExchange();
        Message msg = ex.createMessage().setContent("TEST");
        ex.setMessage(msg);
        ex.consumer(referenceA, new InOnlyOperation(null));
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.