Package org.apache.cxf.endpoint

Examples of org.apache.cxf.endpoint.ClientLifeCycleManager


    private void setUpClientLifeCycleListeners(String[] names, String[] restricted, String excludes) throws Exception {
        ServiceReference[] svcrefs = createTestServiceReferences(names, restricted);
        EasyMock.expect(bundleContext.getServiceReferences(ClientLifeCycleListener.class.getName(), null))
            .andReturn(svcrefs);
        ClientLifeCycleManager lcmanager = control.createMock(ClientLifeCycleManager.class);
        EasyMock.expect(bus.getExtension(ClientLifeCycleManager.class)).andReturn(lcmanager).anyTimes();
        for (int i = 0; i < names.length; i++) {
            ClientLifeCycleListener cl = control.createMock(ClientLifeCycleListener.class);
            EasyMock.expect(bundleContext.getService(svcrefs[i])).andReturn(cl).anyTimes();
            if (!isExcluded(BUNDLE_NAME, names[i], restricted[i], excludes)) {
                lcmanager.registerListener(cl);
                EasyMock.expectLastCall();
            }
        }
    }
View Full Code Here


    public void close() {
        if (cfg.getBus() == null) {
            return;
        }
        ClientLifeCycleManager mgr = cfg.getBus().getExtension(ClientLifeCycleManager.class);
        if (null != mgr) {
            mgr.clientDestroyed(new FrontendClientAdapter(getConfiguration()));
        }

        if (cfg.getConduitSelector() instanceof Closeable) {
            try {
                ((Closeable)cfg.getConduitSelector()).close();
View Full Code Here

                public void stopServer(Server server) {
                    RMManager.this.stopServer(server);
                }
            });
        }
        ClientLifeCycleManager clm = bus.getExtension(ClientLifeCycleManager.class);
        if (null != clm) {
            clm.registerListener(new ClientLifeCycleListener() {
                public void clientCreated(Client client) {
                    RMManager.this.clientCreated(client);
                }
                public void clientDestroyed(Client client) {
                    RMManager.this.clientDestroyed(client);
View Full Code Here

    public void close() {
        if (cfg.getBus() == null) {
            return;
        }
        ClientLifeCycleManager mgr = cfg.getBus().getExtension(ClientLifeCycleManager.class);
        if (null != mgr) {
            mgr.clientDestroyed(new FrontendClientAdapter(getConfiguration()));
        }

        if (cfg.getConduitSelector() instanceof Closeable) {
            try {
                ((Closeable)cfg.getConduitSelector()).close();
View Full Code Here

        }
    }

   
    private void notifyLifecycleManager(Object client) {
        ClientLifeCycleManager mgr = bus.getExtension(ClientLifeCycleManager.class);
        if (null != mgr) {
            mgr.clientCreated(new FrontendClientAdapter(WebClient.getConfig(client)));
        }
    } 
View Full Code Here

        }
        ServerLifeCycleManager slm = bus.getExtension(ServerLifeCycleManager.class);
        if (null != slm) {
            slm.registerListener(this);
        }
        ClientLifeCycleManager clm = bus.getExtension(ClientLifeCycleManager.class);
        if (null != clm) {
            clm.registerListener(this);
        }
    }
View Full Code Here

    public void listenForAllClients() {
        listenForAllClients(null);
    }

    public void listenForAllClients(String selectionStrategy) {
        ClientLifeCycleManager clcm = bus.getExtension(ClientLifeCycleManager.class);
        clcm.registerListener(new ClientLifeCycleListenerForLocator());
    }
View Full Code Here

                    svrListener.setQueue(queue);
                    svrListener.setMonitoringServiceClient(monitoringServiceClient);
                    slcm.registerListener(svrListener);
                }

                ClientLifeCycleManager clcm = bus.getExtension(ClientLifeCycleManager.class);
                if (null != clcm) {
                    ClientListenerImpl cltListener = new ClientListenerImpl();
                    cltListener.setSendLifecycleEvent(sendLifecycleEvent);
                    cltListener.setQueue(queue);
                    cltListener.setMonitoringServiceClient(monitoringServiceClient);
                    clcm.registerListener(cltListener);
                }
            }
        }
    }
View Full Code Here

    slm.setLocatorClientEnabler(enabler);

    expect(busMock.getExtension(ServiceLocatorManager.class))
        .andStubReturn(slm);

    ClientLifeCycleManager clcm = new ClientLifeCycleManagerImpl();
    expect(busMock.getExtension(ClientLifeCycleManager.class))
        .andStubReturn(clcm);

    replayAll();
View Full Code Here

    slm.setLocatorClientEnabler(enabler);

    expect(busMock.getExtension(ServiceLocatorManager.class))
        .andStubReturn(slm);

    ClientLifeCycleManager clcm = new ClientLifeCycleManagerImpl();
    expect(busMock.getExtension(ClientLifeCycleManager.class))
        .andStubReturn(clcm);

    replayAll();
View Full Code Here

TOP

Related Classes of org.apache.cxf.endpoint.ClientLifeCycleManager

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.