Examples of ListenerManager


Examples of org.apache.axis2.engine.ListenerManager

        this.port = port;
        TransportInDescription httpDescription = new TransportInDescription(
                new QName(Constants.TRANSPORT_HTTP));
        httpDescription.setReceiver(this);

        ListenerManager listenerManager = cfgCtx.getListenerManager();
        if (listenerManager == null) {
            listenerManager = new ListenerManager();
            listenerManager.init(cfgCtx);
        }
        cfgCtx.getListenerManager().addListener(httpDescription, true);
    }
View Full Code Here

Examples of org.apache.axis2.engine.ListenerManager

        //businessServer.stop();
        //synapseServer.stop();
    }

    private void startServer(ConfigurationContext configctx) throws AxisFault {
        ListenerManager listenerManager = configctx.getListenerManager();
        if (listenerManager == null) {
            listenerManager = new ListenerManager();
            listenerManager.init(configctx);
        }

        Iterator iter = configctx.getAxisConfiguration().
            getTransportsIn().keySet().iterator();
        while (iter.hasNext()) {
            String trp = (String) iter.next();
            TransportInDescription trsIn = (TransportInDescription)
                configctx.getAxisConfiguration().getTransportsIn().get(trp);
            listenerManager.addListener(trsIn, false);
        }
    }
View Full Code Here

Examples of org.apache.axis2.engine.ListenerManager

            configctx = ConfigurationContextFactory.
                    createConfigurationContextFromFileSystem(axis2Repolocation, null);
           
            listenerManager = configctx.getListenerManager();
            if (listenerManager == null) {
                listenerManager = new ListenerManager();
                listenerManager.init(configctx);
            }
            // decide on HTTP port to execute
            selectPort(configctx);
View Full Code Here

Examples of org.apache.axis2.engine.ListenerManager

        }
        this.configContext = configContext;
        hashCode = (int)anonServiceCounter.incrementAndGet();

        // Initialize transports
        ListenerManager transportManager = configContext.getListenerManager();
        if (transportManager == null) {
            transportManager = new ListenerManager();
            transportManager.init(this.configContext);
        }

        // save the axisConfig and service
        axisConfig = configContext.getAxisConfiguration();
View Full Code Here

Examples of org.apache.axis2.engine.ListenerManager

                } else if (endpointURL.startsWith("jms")) {
                    logger.log(Level.INFO,"Axis2 JMS URL=" + endpointURL);
                   
                    jmsListener = new JMSListener();
                    jmsSender = new JMSSender();
                    ListenerManager listenerManager = configContext.getListenerManager();
                    TransportInDescription trsIn = configContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_JMS);
                                   
                    // get JMS transport parameters from the computed URL
                    Map<String, String> jmsProps = JMSUtils.getProperties(endpointURL);

                    // collect the parameters used to configure the JMS transport
                    OMFactory fac = OMAbstractFactory.getOMFactory();
                    OMElement parms = fac.createOMElement(DEFAULT_QUEUE_CONNECTION_FACTORY, null);                   

                    for ( String key : jmsProps.keySet() ) {
                        OMElement param = fac.createOMElement("parameter", null);
                        param.addAttribute( "name", key, null );
                        param.addChild(fac.createOMText(param, jmsProps.get(key)));
                        parms.addChild(param);
                    }
                   
                    Parameter queueConnectionFactory = new Parameter(DEFAULT_QUEUE_CONNECTION_FACTORY, parms);
                    trsIn.addParameter( queueConnectionFactory );
                   
                    trsIn.setReceiver(jmsListener);

                    configContext.getAxisConfiguration().addTransportIn( trsIn );
                    TransportOutDescription trsOut = configContext.getAxisConfiguration().getTransportOut(Constants.TRANSPORT_JMS);
                    //configContext.getAxisConfiguration().addTransportOut( trsOut );
                    trsOut.setSender(jmsSender);

                    if (listenerManager == null) {
                        listenerManager = new ListenerManager();
                        listenerManager.init(configContext);
                    }
                    listenerManager.addListener(trsIn, true);
                    jmsSender.init(configContext, trsOut);
                    jmsListener.init(configContext, trsIn);
                    jmsListener.start();
                }
            }
View Full Code Here

Examples of org.apache.axis2.engine.ListenerManager

        public void run() {processException = null;
            log.info("ServerThread: Initializing Axis2 Server: " + serverName);
            processException = null;
            try {
                listenerManager = new ListenerManager();

                configContext = ConfigurationContextFactory
                        .createConfigurationContextFromFileSystem(configuration.getAxis2Repo(),
                                configuration.getAxis2Xml());
View Full Code Here

Examples of org.apache.axis2.engine.ListenerManager

        if (transportInProtocol==null) {
          throw new SandeshaException ("You must mention the transport in protocol for getting async acknowledgement messages");
        }
      
            try {
        ListenerManager listenerManager =
            firstAplicationMsgCtx.getConfigurationContext().getListenerManager();
        TransportInDescription transportIn = firstAplicationMsgCtx.getConfigurationContext().getAxisConfiguration().getTransportIn(new QName(transportInProtocol));
        //if acksTo is not anonymous start the in-transport
        if (!listenerManager.isListenerRunning(transportIn.getName().getLocalPart())) {
          listenerManager.addListener(transportIn, false);
        }
      } catch (AxisFault e) {
        throw new SandeshaException ("Could not stast the transport listner",e);
      }
     
View Full Code Here

Examples of org.apache.axis2.engine.ListenerManager

                } else if (endpointURL.startsWith("jms")) {
                    logger.log(Level.INFO,"Axis2 JMS URL=" + endpointURL);
                   
                    jmsListener = new JMSListener();
                    jmsSender = new JMSSender();
                    ListenerManager listenerManager = configContext.getListenerManager();
                    TransportInDescription trsIn = configContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_JMS);
                                   
                    // get JMS transport parameters from the computed URL
                    Map<String, String> jmsProps = JMSUtils.getProperties(endpointURL);

                    // collect the parameters used to configure the JMS transport
                    OMFactory fac = OMAbstractFactory.getOMFactory();
                    OMElement parms = fac.createOMElement(DEFAULT_QUEUE_CONNECTION_FACTORY, null);                   

                    for ( String key : jmsProps.keySet() ) {
                        OMElement param = fac.createOMElement("parameter", null);
                        param.addAttribute( "name", key, null );
                        param.addChild(fac.createOMText(param, jmsProps.get(key)));
                        parms.addChild(param);
                    }
                   
                    Parameter queueConnectionFactory = new Parameter(DEFAULT_QUEUE_CONNECTION_FACTORY, parms);
                    trsIn.addParameter( queueConnectionFactory );
                   
                    trsIn.setReceiver(jmsListener);

                    configContext.getAxisConfiguration().addTransportIn( trsIn );
                    TransportOutDescription trsOut = configContext.getAxisConfiguration().getTransportOut(Constants.TRANSPORT_JMS);
                    //configContext.getAxisConfiguration().addTransportOut( trsOut );
                    trsOut.setSender(jmsSender);

                    if (listenerManager == null) {
                        listenerManager = new ListenerManager();
                        listenerManager.init(configContext);
                    }
                    listenerManager.addListener(trsIn, true);
                    jmsSender.init(configContext, trsOut);
                    jmsListener.init(configContext, trsIn);
                    jmsListener.start();
                }
            }
View Full Code Here

Examples of org.apache.axis2.engine.ListenerManager

            receiver = new SimpleHTTPServer(er, TESTING_PORT);

            try {
                receiver.start();
                ListenerManager listenerManager = er.getListenerManager();
                TransportInDescription trsIn = new TransportInDescription(Constants.TRANSPORT_HTTP);
                trsIn.setReceiver(receiver);
                if (listenerManager == null) {
                    listenerManager = new ListenerManager();
                    listenerManager.init(er);
                }
                listenerManager.addListener(trsIn, true);
                System.out.print("Server started on port "
                        + TESTING_PORT + ".....");
            } catch (Exception e) {
                e.printStackTrace();
            }
View Full Code Here

Examples of org.apache.axis2.engine.ListenerManager

                        AxisServletListener.class.getName() + " exists, then all instances " +
                        "must be configured with a port number. WSDL generation will be " +
                        "unreliable.");
            }
           
            ListenerManager listenerManager = new ListenerManager();
            listenerManager.init(configContext);
            listenerManager.start();
            ListenerManager.defaultConfigurationContext = configContext;
            agent = new ListingAgent(configContext);

            initParams();
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.