Package org.apache.cxf.dosgi.dsw.handlers

Examples of org.apache.cxf.dosgi.dsw.handlers.ConfigurationTypeHandler


            LOG.info("not proxifying service, enabling property not set: "
                 + DistributionConstants.REMOTE_INTERFACES);
            return;
        }
           
        ConfigurationTypeHandler handler =
            ServiceHookUtils.getHandler(getContext(), sd, getDistributionProvider(), getHandlerProperties());
        if (handler == null) {
            LOG.info("not proxifying service, config type handler null");
            return;
        }
View Full Code Here


        }
       
        @Override
        protected ConfigurationTypeHandler getHandler(ServiceEndpointDescription sd,
                                                      Map<String, Object> props) {
            return new ConfigurationTypeHandler() {

                public Object createProxy(ServiceReference sr,
                                          BundleContext dswContext, BundleContext callingContext,
                                          Class<?> iClass, ServiceEndpointDescription sd) {
                    throw new UnsupportedOperationException();
View Full Code Here

        BundleContext dswContext = control.createMock(BundleContext.class);
        BundleContext callingContext = control.createMock(BundleContext.class);
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("java.lang.String");
        Object service = "hi";

        ConfigurationTypeHandler handler = control.createMock(ConfigurationTypeHandler.class);
        handler.createServer(serviceReference, dswContext, callingContext, sd, String.class, service);
        EasyMock.expectLastCall().andReturn(srvr);
        control.replay();
       
        assertSame(srvr,
            ServiceHookUtils.createServer(handler, serviceReference, dswContext, callingContext, sd, service));       
View Full Code Here

        BundleContext dswContext = control.createMock(BundleContext.class);
        BundleContext callingContext = control.createMock(BundleContext.class);
        ServiceEndpointDescription sd = mockServiceDescription(control, "Foo");
        Object service = "hi";

        ConfigurationTypeHandler handler = control.createMock(ConfigurationTypeHandler.class);
        handler.createServer(serviceReference, dswContext, callingContext, sd, String.class, service);
        EasyMock.expectLastCall().andReturn(srvr);
        control.replay();
       
        assertNull(ServiceHookUtils.createServer(handler, serviceReference, dswContext, callingContext, sd, service));       
    }
View Full Code Here

            // FIXME: move out of synchronized ... -> blocks until publication is finished
            for (String iface : interfaces) {
                LOG.info("creating server for interface " + iface);

                ExportRegistrationImpl exportRegistration = exportRegs.get(iface);
                ConfigurationTypeHandler handler = getHandler(configurationTypes, serviceProperties,
                                                              getHandlerProperties());
                Object serviceObject = bctx.getService(serviceReference);
                BundleContext callingContext = serviceReference.getBundle().getBundleContext();

                if (handler == null) {
                    // TODO: publish error event ? not sure
                    return Collections.EMPTY_LIST;
                }

                LOG.info("found handler for " + iface + "  -> " + handler);

                String interfaceName = iface;
                // this is an extra sanity check, but do we really need it now ?
                Class<?> interfaceClass = ClassUtils.getInterfaceClass(serviceObject, interfaceName);

                if (interfaceClass != null) {

                    handler.createServer(exportRegistration, bctx, callingContext, serviceProperties,
                                         interfaceClass, serviceObject);
                   
                    if(exportRegistration.getException()==null){
                        LOG.info("created server for interface " + iface);
View Full Code Here

                            + remoteConfigurationTypes);
                return null;
            }

            Map<String, Object> emptyProps = Collections.EMPTY_MAP;
            ConfigurationTypeHandler handler = getHandler(usableConfigurationTypes, endpoint.getProperties(),
                                                          emptyProps);

            if (handler == null) {
                LOG.severe("no handler found");
                return null;
View Full Code Here

        if ((sd.getProperty(Constants.EXPORTED_INTERFACES) == null) &&
            (sd.getProperty(Constants.EXPORTED_INTERFACES_OLD) == null)) {
            return;
        }
           
        ConfigurationTypeHandler handler =
            ServiceHookUtils.getHandler(getContext(), sd, getDistributionProvider(), getHandlerProperties());
        if (handler == null) {
            LOG.info("not proxifying service, config type handler null");
            return;
        }
View Full Code Here

        }
       
        @Override
        protected ConfigurationTypeHandler getHandler(ServiceEndpointDescription sd,
                                                      Map<String, Object> props) {
            return new ConfigurationTypeHandler() {
                public String getType() {
                    return "test";
                }

                public Object createProxy(ServiceReference sr,
View Full Code Here

        IMocksControl control = EasyMock.createNiceControl();
        BundleContext bc = control.createMock(BundleContext.class);
        CxfDistributionProvider dp = control.createMock(CxfDistributionProvider.class);
        ServiceEndpointDescription sed = control.createMock(ServiceEndpointDescription.class);
        EasyMock.expect(sed.getProperties()).andReturn(new HashMap<String, Object>()).anyTimes();
        ConfigurationTypeHandler handler = control.createMock(ConfigurationTypeHandler.class);
        EasyMock.expect(handler.getType()).andReturn("test").anyTimes();
        control.replay();
               
       
        AbstractClientHook ch = new AbstractClientHook(bc, dp) {
            @Override
View Full Code Here

TOP

Related Classes of org.apache.cxf.dosgi.dsw.handlers.ConfigurationTypeHandler

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.