Source:
<code>public void init(ConfigurationContext configurationContext, TransportInDescription transportInDescription) { LOG.info("Init Axis2HttpTransportListener"); this.configurationContext = configurationContext; workerPool = WorkerPoolFactory.getWorkerPool( BridgeConstants.DEFAULT_WORKER_POOL_SIZE_CORE, BridgeConstants.DEFAULT_WORKER_POOL_SIZE_MAX, BridgeConstants.DEFAULT_WORKER_THREAD_KEEPALIVE_SEC, BridgeConstants.DEFAULT_WORKER_POOL_QUEUE_LENGTH, BridgeConstants.HTTP_WORKER_THREAD_GROUP_NAME, BridgeConstants.HTTP_WORKER_THREAD_ID); int portOffset = Integer.parseInt(System.getProperty("portOffset", "0")); Parameter portParam = transportInDescription.getParameter(TransportListener.PARAM_PORT); int port = Integer.parseInt(portParam.getValue().toString()); int operatingPort = port + portOffset; String host; <START> Parameter hostParameter = transportInDescription.getParameter(TransportListener.HOST_ADDRESS); <END> if (hostParameter != null) { host = ((String) hostParameter.getValue()).trim(); } else { try { host = java.net.InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { LOG.warn("Unable to lookup local host name, using 'localhost'"); host = "localhost"; } } ListenerConfiguration listenerConfiguration = new ListenerConfiguration(); listenerConfiguration.setPort(operatingPort); listenerConfiguration.setHost(host); HttpWsConnectorFactory httpWsConnectorFactory = new DefaultHttpWsConnectorFactory(); serverConnector = httpWsConnectorFactory .createServerConnector(new ServerBootstrapConfiguration(new HashMap<>()), listenerConfiguration); }</code><technical_language>if defined port parameter</technical_language>

Target:
public void init(ConfigurationContext configurationContext, TransportInDescription transportInDescription) { LOG.info("Initializing Axis2HttpTransportListener"); this.configurationContext = configurationContext; workerPool = WorkerPoolFactory.getWorkerPool( BridgeConstants.DEFAULT_WORKER_POOL_SIZE_CORE, BridgeConstants.DEFAULT_WORKER_POOL_SIZE_MAX, BridgeConstants.DEFAULT_WORKER_THREAD_KEEPALIVE_SEC, BridgeConstants.DEFAULT_WORKER_POOL_QUEUE_LENGTH, BridgeConstants.HTTP_WORKER_THREAD_GROUP_NAME, BridgeConstants.HTTP_WORKER_THREAD_ID); int portOffset = Integer.parseInt(System.getProperty("portOffset", "0")); Parameter portParam = transportInDescription.getParameter(TransportListener.PARAM_PORT); if (portParam == null) { throw new AxisError("Port parameter is not specified for Axis2HttpTransportListener"); } int port = Integer.parseInt(portParam.getValue().toString()); int operatingPort = port + portOffset; String host; Parameter hostParameter = transportInDescription.getParameter(TransportListener.HOST_ADDRESS); if (hostParameter != null) { host = ((String) hostParameter.getValue()).trim(); } else { try { host = java.net.InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { LOG.warn("Unable to lookup local host name, using 'localhost'"); host = "localhost"; } } ListenerConfiguration listenerConfiguration = new ListenerConfiguration(); listenerConfiguration.setPort(operatingPort); listenerConfiguration.setHost(host); HttpWsConnectorFactory httpWsConnectorFactory = new DefaultHttpWsConnectorFactory(); serverConnector = httpWsConnectorFactory .createServerConnector(new ServerBootstrapConfiguration(new HashMap<>()), listenerConfiguration); }