Package org.apache.cxf.endpoint

Examples of org.apache.cxf.endpoint.ServerRegistry


    }
   
    private static MultiplexDestination getMatchingMultiplexDestination(QName serviceQName, String portName,
                                                                        Bus bus) {
        MultiplexDestination destination = null;
        ServerRegistry serverRegistry = (ServerRegistry)bus.getExtension(ServerRegistry.class);
        if (null != serverRegistry) {
            List<Server> servers = serverRegistry.getServers();
            for (Server s : servers) {
                QName targetServiceQName = s.getEndpoint().getEndpointInfo().getService().getName();
                if (serviceQName.equals(targetServiceQName) && portNameMatches(s, portName)) {
                    Destination dest = s.getDestination();
                    if (dest instanceof MultiplexDestination) {
View Full Code Here


        protected void run()  {           
            SpringBusFactory bf = new SpringBusFactory();
            Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/rmwsdl_server.xml");
            BusFactory.setDefaultBus(bus);
           
            ServerRegistry sr = bus.getExtension(ServerRegistry.class);
            PolicyEngine pe = bus.getExtension(PolicyEngine.class);
           
            List<PolicyAssertion> assertions1
                = getAssertions(pe, sr.getServers().get(0));
            assertEquals("2 assertions should be available", 2, assertions1.size());
            List<PolicyAssertion> assertions2 =
                getAssertions(pe, sr.getServers().get(1));
            assertEquals("1 assertion should be available", 1, assertions2.size());
           
            LOG.info("Published greeter endpoints.");
        }
View Full Code Here

        StringsCompleter delegate = new StringsCompleter();
        try {
            List<Bus> busses = cxfController.getBusses();
          
            for (Bus b : busses) {
                ServerRegistry reg = b.getExtension(ServerRegistry.class);
                List<Server> servers = reg.getServers();
               
                for (Server serv : servers) {
                    if (acceptsFeature(serv)) {
                        String qname = serv.getEndpoint().getEndpointInfo().getName().getLocalPart();
                        delegate.getStrings().add(qname);
View Full Code Here

   
   
    private static MultiplexDestination getMatchingMultiplexDestination(QName serviceQName, String portName,
                                                                        Bus bus) {
        MultiplexDestination destination = null;
        ServerRegistry serverRegistry = (ServerRegistry)bus.getExtension(ServerRegistry.class);
        if (null != serverRegistry) {
            List<Server> servers = serverRegistry.getServers();
            for (Server s : servers) {
                QName targetServiceQName = s.getEndpoint().getEndpointInfo().getService().getName();
                if (serviceQName.equals(targetServiceQName) && portNameMatches(s, portName)) {
                    Destination dest = s.getDestination();
                    if (dest instanceof MultiplexDestination) {
View Full Code Here

        wsdlBuilder.setUseSchemaImports(false);
        return wsdlBuilder.build();
    }

    public Server getServerForService(QName serviceName) throws WSDLException {
        ServerRegistry svrMan = bus.getExtension(ServerRegistry.class);
        for (Server s : svrMan.getServers()) {
            Service svc = s.getEndpoint().getService();
            if (svc.getName().equals(serviceName)) {
                return s;
            }
        }
View Full Code Here

        }
        return null;
    }
   
    public Server getServerForAddress(String address) throws WSDLException {
        ServerRegistry svrMan = bus.getExtension(ServerRegistry.class);
        for (Server s : svrMan.getServers()) {
            if (address.equals(s.getEndpoint().getEndpointInfo().getAddress())) {
                return s;
            }
        }
        return null;
View Full Code Here

   
   
    private static MultiplexDestination getMatchingMultiplexDestination(QName serviceQName, String portName,
                                                                        Bus bus) {
        MultiplexDestination destination = null;
        ServerRegistry serverRegistry = (ServerRegistry)bus.getExtension(ServerRegistry.class);
        if (null != serverRegistry) {
            List<Server> servers = serverRegistry.getServers();
            for (Server s : servers) {
                QName targetServiceQName = s.getEndpoint().getEndpointInfo().getService().getName();
                if (serviceQName.equals(targetServiceQName) && portNameMatches(s, portName)) {
                    Destination dest = s.getDestination();
                    if (dest instanceof MultiplexDestination) {
View Full Code Here

            } else {
                busses = Collections.emptyList();
            }
        }
        for (Bus b : busses) {
            ServerRegistry reg = b.getExtension(ServerRegistry.class);
            List<Server> servers = reg.getServers();
            System.out.println(String.format(HEADER_FORMAT,
                                             "Name", "State", "Address"));
            for (Server serv : servers) {
                String qname = serv.getEndpoint().getEndpointInfo().getName().getLocalPart();
                String started = serv.isStarted() ? "Started" : "Stopped";
View Full Code Here

        protected void run()  {           
            SpringBusFactory bf = new SpringBusFactory();
            Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/rmwsdl_server.xml");
            BusFactory.setDefaultBus(bus);
           
            ServerRegistry sr = bus.getExtension(ServerRegistry.class);
            PolicyEngine pe = bus.getExtension(PolicyEngine.class);
           
            List<PolicyAssertion> assertions1
                = getAssertions(pe, sr.getServers().get(0));
            assertEquals("2 assertions should be available", 2, assertions1.size());
            List<PolicyAssertion> assertions2 =
                getAssertions(pe, sr.getServers().get(1));
            assertEquals("1 assertion should be available", 1, assertions2.size());
           
            LOG.info("Published greeter endpoints.");
        }
View Full Code Here

   
   
    private static MultiplexDestination getMatchingMultiplexDestination(QName serviceQName, String portName,
                                                                        Bus bus) {
        MultiplexDestination destination = null;
        ServerRegistry serverRegistry = (ServerRegistry)bus.getExtension(ServerRegistry.class);
        if (null != serverRegistry) {
            List<Server> servers = serverRegistry.getServers();
            for (Server s : servers) {
                QName targetServiceQName = s.getEndpoint().getEndpointInfo().getService().getName();
                if (serviceQName.equals(targetServiceQName) && portNameMatches(s, portName)) {
                    Destination dest = s.getDestination();
                    if (dest instanceof MultiplexDestination) {
View Full Code Here

TOP

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

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.