Package org.apache.axis2.engine

Examples of org.apache.axis2.engine.ListenerManager


                  configContext = initConfigContext(config);
                  config.getServletContext().setAttribute(CONFIGURATION_CONTEXT, configContext);
              }
              axisConfiguration = configContext.getAxisConfiguration();
 
              ListenerManager listenerManager = new TuscanyListenerManager();
              listenerManager.init(configContext);
              TransportInDescription transportInDescription = new TransportInDescription(
                      Constants.TRANSPORT_HTTP);
              transportInDescription.setReceiver(this);
              listenerManager.addListener(transportInDescription, true);
              listenerManager.start();
              ListenerManager.defaultConfigurationContext = configContext;
              super.agent = new ListingAgent(configContext);
 
              initParams();
 
View Full Code Here


                configContext = initConfigContext(config);
                config.getServletContext().setAttribute(CONFIGURATION_CONTEXT, configContext);
            }
            axisConfiguration = configContext.getAxisConfiguration();

            ListenerManager listenerManager = new ListenerManager();
            listenerManager.init(configContext);
            TransportInDescription transportInDescription = new TransportInDescription(
                    Constants.TRANSPORT_HTTP);
            transportInDescription.setReceiver(this);
            listenerManager.addListener(transportInDescription, true);
            listenerManager.start();
            ListenerManager.defaultConfigurationContext = configContext;
            agent = new ListingAgent(configContext);

            initParams();
View Full Code Here

    /**
     * Return the configured listener manager or create and configure one with configurationContext
     */
    public ListenerManager getListenerManager() {
        ListenerManager lm = configurationContext.getListenerManager();
        if (lm == null) {
            lm = new ListenerManager();
            lm.init(configurationContext);
        }
        return lm;
    }
View Full Code Here

    ListenerManager lm;

    protected void setUp() throws Exception {
        configContext =
                ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
        lm = new ListenerManager();
        lm.init(configContext);
        lm.start();
    }
View Full Code Here

    ListenerManager lm;

    protected void setUp() throws Exception {
        configContext =
                ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
        lm = new ListenerManager();
        lm.init(configContext);
        lm.start();
    }
View Full Code Here

        }
        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();
        if (axisService == null) {
View Full Code Here

     */
    public EndpointReference getMyEPR(String transport) throws AxisFault {
        axisService.isEnableAllTransports();
        ConfigurationContext configctx = this.configContext;
        if (configctx != null) {
            ListenerManager lm = configctx.getListenerManager();
            if (!lm.isListenerRunning(transport)) {
                TransportInDescription trsin =
                        configctx.getAxisConfiguration().getTransportIn(transport);
                if (trsin != null) {
                    lm.addListener(trsin, false);
                } else {
                    throw new AxisFault(Messages.getMessage("transportnotfound",
                                                            transport));
                }
            }
            if (!lm.isStopped()) {
                return lm.getEPRforService(axisService.getName(), null, transport);
            }
        }
        return null;
    }
View Full Code Here

    public EndpointReference getMyEPR() {
        if (myEPR == null) {
            try {
                if (ListenerManager.defaultConfigurationContext != null) {
                    ListenerManager listenerManager =
                            ListenerManager.defaultConfigurationContext.getListenerManager();
                    myEPR = listenerManager.getEPRforService(axisService.getName(), null, null);
                }
            } catch (AxisFault axisFault) {
                // what else I can do
                myEPR = null;
            }
View Full Code Here

        }
        TransportInDescription transportIn = null;
        if (options.isUseSeparateListener() || msgCtxt.getOptions().isUseSeparateListener()) {
            if ((listenerTransportProtocol != null) && !"".equals(listenerTransportProtocol)) {
                transportIn = ac.getTransportIn(listenerTransportProtocol);
                ListenerManager listenerManager =
                        msgCtxt.getConfigurationContext().getListenerManager();
                if (transportIn == null) {
                    // TODO : User should not be mandated to give an IN transport. If it is not given, we should
                    // ask from the ListenerManager to give any available transport for this client.
                    log.error(Messages.getMessage("unknownTransport",
                                                            listenerTransportProtocol));
                    throw new AxisFault(Messages.getMessage("unknownTransport",
                                                            listenerTransportProtocol));
                }
                if (!listenerManager.isListenerRunning(transportIn.getName())) {
                    listenerManager.addListener(transportIn, false);
                }
            }
            if (msgCtxt.getAxisService() != null) {
                if (!msgCtxt.isEngaged(Constants.MODULE_ADDRESSING)) {
                    log.error(Messages.getMessage("2channelNeedAddressing"));
View Full Code Here

    public UtilsTransportServer() throws AxisFault {
        cfgCtx = ConfigurationContextFactory.
                    createConfigurationContext(new CustomAxisConfigurator());

        // create listener manager
        listnMgr = new ListenerManager();
        listnMgr.init(cfgCtx);
        cfgCtx.setTransportManager(listnMgr);
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.engine.ListenerManager

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.