Search in sources :

Example 1 with SSLConfiguration

use of org.apache.synapse.transport.netty.api.config.SSLConfiguration in project wso2-synapse by wso2.

the class HttpWebSocketInboundEndpointHandler method createTransportInDescription.

private static TransportInDescription createTransportInDescription(String transportName, TransportListener transportListener, HttpWebSocketInboundEndpointConfiguration httpWebSocketConfig) throws AxisFault {
    TransportInDescription transportInDescription = new TransportInDescription(transportName);
    transportInDescription.setReceiver(transportListener);
    // populate parameters
    addParameter(transportInDescription, BridgeConstants.PORT_PARAM, httpWebSocketConfig.getPort());
    addParameter(transportInDescription, BridgeConstants.HOSTNAME_PARAM, httpWebSocketConfig.getHostname());
    addParameter(transportInDescription, BridgeConstants.HTTP_PROTOCOL_VERSION_PARAM, httpWebSocketConfig.getHttpProtocolVersion());
    SSLConfiguration sslConfiguration = httpWebSocketConfig.getSslConfiguration();
    // SSLConfiguration will be null for non-secured transport. Hence, need to do the null check here.
    if (Objects.nonNull(sslConfiguration)) {
        populateSSLParameters(sslConfiguration, transportInDescription);
    }
    return transportInDescription;
}
Also used : SSLConfiguration(org.apache.synapse.transport.netty.api.config.SSLConfiguration) TransportInDescription(org.apache.axis2.description.TransportInDescription)

Aggregations

TransportInDescription (org.apache.axis2.description.TransportInDescription)1 SSLConfiguration (org.apache.synapse.transport.netty.api.config.SSLConfiguration)1