Package org.apache.cxf.endpoint

Examples of org.apache.cxf.endpoint.ClientLifeCycleManager


                c.close();
            } catch (IOException e) {
                //ignore
            }
        }
        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


                c.close();
            } catch (IOException e) {
                //ignore
            }
        }
        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

            throw new RuntimeException(ex);
        }
    }

    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

    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

            new ClassPathXmlApplicationContext(new String[] {cfgFile});
        Object bean = ctx.getBean("bookService.proxyFactory");
        assertNotNull(bean);
        JAXRSClientFactoryBean cfb = (JAXRSClientFactoryBean) bean;
        Bus bus = cfb.getBus();
        ClientLifeCycleManager manager = bus.getExtension(ClientLifeCycleManager.class);
        TestClientLifeCycleListener listener = new TestClientLifeCycleListener();
        manager.registerListener(listener);
        BookStore bs = cfb.create(BookStore.class);
        assertNotNull(listener.getEp());
        assertEquals("{http://service.rs}BookService",
                     listener.getEp().getEndpointInfo().getName().toString());
        assertEquals("https://localhost:" + PORT, WebClient.client(bs).getBaseURI().toString());
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 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) {
                    shutdownResources(server.getEndpoint().getEndpointInfo());
                }
            });
        }
        ClientLifeCycleManager cm = b.getExtension(ClientLifeCycleManager.class);
        if (cm != null) {
            cm.registerListener(new ClientLifeCycleListener() {
                public void clientCreated(Client client) {
                }
                public void clientDestroyed(Client client) {
                    shutdownResources(client.getEndpoint().getEndpointInfo());
                }
View Full Code Here

                public void stopServer(Server server) {
                    shutdownResources(server.getEndpoint().getEndpointInfo());
                }
            });
        }
        ClientLifeCycleManager cm = b.getExtension(ClientLifeCycleManager.class);
        if (cm != null) {
            cm.registerListener(new ClientLifeCycleListener() {
                public void clientCreated(Client client) {
                }
                public void clientDestroyed(Client client) {
                    shutdownResources(client.getEndpoint().getEndpointInfo());
                }
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.