Package org.apache.cxf.endpoint

Examples of org.apache.cxf.endpoint.ServerLifeCycleListener


   
    @Test
    public void testGetActiveFeatures() {
        assertNotNull("unexpected non-null ServerLifeCycleManager", manager);

        manager.registerListener(new ServerLifeCycleListener() {
            public void startServer(Server server) {
                org.apache.cxf.endpoint.Endpoint endpoint
                    = server.getEndpoint();
                updateMap(startNotificationMap,
                          endpoint.getEndpointInfo().getAddress());
View Full Code Here


        if (null == bus) {
            return;
        }
        ServerLifeCycleManager slm = bus.getExtension(ServerLifeCycleManager.class);
        if (null != slm) {
            slm.registerListener(new ServerLifeCycleListener() {
                public void startServer(Server server) {
                    RMManager.this.startServer(server);
                }
                public void stopServer(Server server) {
                    RMManager.this.stopServer(server);
View Full Code Here

    private void registerServerLifecycleListeners() {
        ServiceReference refs[] = getServiceReferences(defaultContext, ServerLifeCycleListener.class);
        ServerLifeCycleManager clcm = bus.getExtension(ServerLifeCycleManager.class);
        for (ServiceReference ref : refs) {
            if (!isPrivate(ref)) {
                ServerLifeCycleListener listener = (ServerLifeCycleListener)defaultContext.getService(ref);
                clcm.registerListener(listener);
            }
        }
    }
View Full Code Here

                    .getServiceReferences(ServerLifeCycleListener.class.getName(), null);
                if (refs != null) {
                    ServerLifeCycleManager clcm = bus.getExtension(ServerLifeCycleManager.class);
                    for (ServiceReference ref : refs) {
                        if (allowService(ref)) {
                            ServerLifeCycleListener listener
                                = (ServerLifeCycleListener)defaultContext.getService(ref);
                            clcm.registerListener(listener);
                        }
                    }
                }
               
            } catch (InvalidSyntaxException e) {
                //ignore
            }
            try {
                ServiceReference refs[] = defaultContext
                    .getServiceReferences(BusCreationListener.class.getName(), null);
                if (refs != null) {
                    for (ServiceReference ref : refs) {
                        if (allowService(ref)) {
                            BusCreationListener listener
                                = (BusCreationListener)defaultContext.getService(ref);
                            listener.busCreated(bus);
                        }
                    }
                }
            } catch (InvalidSyntaxException e) {
                //ignore
View Full Code Here

    protected void registerStopHook(Bus bus, final HttpService httpService,
                                    Server theServer, final String contextRoot,
                                    final String propertyName) {
        if(bus != null) {
            theServer.getEndpoint().put(propertyName, contextRoot);
            ServerLifeCycleListener stopHook = new ServerLifeCycleListener() {
                public void stopServer(Server s) {
                    Object contextProperty = s.getEndpoint().get(propertyName);
                    if (contextProperty != null && contextProperty.equals(contextRoot)) {
                        httpService.unregister(contextRoot);
                    }
View Full Code Here

        if (null == bus) {
            return;
        }
        ServerLifeCycleManager slm = bus.getExtension(ServerLifeCycleManager.class);
        if (null != slm) {
            slm.registerListener(new ServerLifeCycleListener() {
                public void startServer(Server server) {
                    RMManager.this.startServer(server);
                }
                public void stopServer(Server server) {
                    RMManager.this.stopServer(server);
View Full Code Here

        try {
            Thread.currentThread().setContextClassLoader(ServerFactoryBean.class.getClassLoader());
            Server server = factory.create();
            server.getEndpoint().put("WS", CONTEXT_ROOT);
            Thread.currentThread().setContextClassLoader(ServerFactoryBean.class.getClassLoader());
            ServerLifeCycleListener stopHook = new ServerLifeCycleListener() {
                @Override
                public void stopServer(Server s) {
                    Object contextProperty = s.getEndpoint().get("WS");
                    if (contextProperty != null && contextProperty.equals(CONTEXT_ROOT)) {
                        httpService.unregister(CONTEXT_ROOT);
View Full Code Here

            //and error out at that point.  If nothing uses ws-securitypolicy
            //no warnings/errors will display
        }
        ServerLifeCycleManager m = b.getExtension(ServerLifeCycleManager.class);
        if (m != null) {
            m.registerListener(new ServerLifeCycleListener() {
                public void startServer(Server server) {
                }
                public void stopServer(Server server) {
                    shutdownResources(server.getEndpoint().getEndpointInfo());
                }
View Full Code Here

            //and error out at that point.  If nothing uses ws-securitypolicy
            //no warnings/errors will display
        }
        ServerLifeCycleManager m = b.getExtension(ServerLifeCycleManager.class);
        if (m != null) {
            m.registerListener(new ServerLifeCycleListener() {
                public void startServer(Server server) {
                }
                public void stopServer(Server server) {
                    shutdownResources(server.getEndpoint().getEndpointInfo());
                }
View Full Code Here

        if (null == bus) {
            return;
        }
        ServerLifeCycleManager slm = bus.getExtension(ServerLifeCycleManager.class);
        if (null != slm) {
            slm.registerListener(new ServerLifeCycleListener() {
                public void startServer(Server server) {
                    RMManager.this.startServer(server);
                }
                public void stopServer(Server server) {
                    RMManager.this.stopServer(server);
View Full Code Here

TOP

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

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.