use of org.wso2.transport.http.netty.contract.config.ServerBootstrapConfiguration in project wso2-synapse by wso2.
the class Axis2HttpTransportListener method init.
@Override
public void init(ConfigurationContext configurationContext, TransportInDescription transportInDescription) throws AxisFault {
Scheme scheme = initScheme();
this.transportInDescription = transportInDescription;
// build source configuration
sourceConfiguration = new SourceConfiguration(configurationContext, transportInDescription, scheme, messagingHandlers);
sourceConfiguration.build();
sourceConfiguration.getHttpGetRequestProcessor().init(sourceConfiguration.getConfigurationContext());
ListenerConfiguration listenerConfiguration = initListenerConfiguration();
httpWsConnectorFactory = new DefaultHttpWsConnectorFactory();
this.serverConnector = httpWsConnectorFactory.createServerConnector(new ServerBootstrapConfiguration(new HashMap<>()), listenerConfiguration);
}
use of org.wso2.transport.http.netty.contract.config.ServerBootstrapConfiguration in project ballerina by ballerina-lang.
the class HttpConnectionManager method createHttpServerConnector.
public ServerConnector createHttpServerConnector(ListenerConfiguration listenerConfig) {
String listenerInterface = listenerConfig.getHost() + ":" + listenerConfig.getPort();
HttpServerConnectorContext httpServerConnectorContext = serverConnectorPool.get(listenerInterface);
if (httpServerConnectorContext != null) {
if (checkForConflicts(listenerConfig, httpServerConnectorContext)) {
throw new BallerinaConnectorException("Conflicting configuration detected for listener " + "configuration id " + listenerConfig.getId());
}
httpServerConnectorContext.incrementReferenceCount();
return httpServerConnectorContext.getServerConnector();
}
if (isHTTPTraceLoggerEnabled()) {
listenerConfig.setHttpTraceLogEnabled(true);
}
serverBootstrapConfiguration = HTTPConnectorUtil.getServerBootstrapConfiguration(trpConfig.getTransportProperties());
ServerConnector serverConnector = httpConnectorFactory.createServerConnector(serverBootstrapConfiguration, listenerConfig);
httpServerConnectorContext = new HttpServerConnectorContext(serverConnector, listenerConfig);
serverConnectorPool.put(serverConnector.getConnectorID(), httpServerConnectorContext);
httpServerConnectorContext.incrementReferenceCount();
addStartupDelayedHTTPServerConnector(listenerInterface, serverConnector);
return serverConnector;
}
Aggregations