Examples of ServerLifeCycleListener


Examples of org.apache.cxf.endpoint.ServerLifeCycleListener

        SingleBusLocatorRegistrar locatorRegistrar = new SingleBusLocatorRegistrar(bus);
        locatorRegistrar.setServiceLocator(sl);
        locatorRegistrar.startListenForServers();

        ServerLifeCycleListener listener = slclCapture.getValue();
        listener.startServer(SERVER_1);

        verifyAll();
    }
View Full Code Here

Examples of org.apache.cxf.endpoint.ServerLifeCycleListener

   
    @Test
    public void testRecursive() {       
        assertNotNull("unexpected non-null ServerLifeCycleManager", manager);
       
        manager.registerListener(new ServerLifeCycleListener() {
            public void startServer(Server server) {
                String address =
                    server.getEndpoint().getEndpointInfo().getAddress();          
                verifyNotification(startNotificationMap, address, 0);
                updateMap(startNotificationMap, address);
View Full Code Here

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

Examples of org.apache.cxf.endpoint.ServerLifeCycleListener

   
    @Test
    public void testRecursive() {       
        assertNotNull("unexpected non-null ServerLifeCycleManager", manager);
       
        manager.registerListener(new ServerLifeCycleListener() {
            public void startServer(Server server) {
                String address =
                    server.getEndpoint().getEndpointInfo().getAddress();          
                verifyNotification(startNotificationMap, address, 0);
                updateMap(startNotificationMap, address);
View Full Code Here

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

Examples of org.apache.cxf.endpoint.ServerLifeCycleListener

        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

Examples of org.apache.cxf.endpoint.ServerLifeCycleListener

    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

Examples of org.apache.cxf.endpoint.ServerLifeCycleListener

                    .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

Examples of org.apache.cxf.endpoint.ServerLifeCycleListener

    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

Examples of org.apache.cxf.endpoint.ServerLifeCycleListener

        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
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.