Search in sources :

Example 1 with AhcWebSocketConduit

use of org.apache.cxf.transport.websocket.ahc.AhcWebSocketConduit in project cxf by apache.

the class WebSocketTransportFactory method getConduit.

/**
 * {@inheritDoc}
 */
public Conduit getConduit(EndpointInfo endpointInfo, EndpointReferenceType target, Bus bus) throws IOException {
    HTTPConduit conduit = new AhcWebSocketConduit(bus, endpointInfo, target);
    String address = conduit.getAddress();
    if (address != null && address.indexOf('?') != -1) {
        address = address.substring(0, address.indexOf('?'));
    }
    HTTPConduitConfigurer c1 = bus.getExtension(HTTPConduitConfigurer.class);
    if (c1 != null) {
        c1.configure(conduit.getBeanName(), address, conduit);
    }
    configure(bus, conduit, conduit.getBeanName(), address);
    conduit.finalizeConfig();
    return conduit;
}
Also used : HTTPConduit(org.apache.cxf.transport.http.HTTPConduit) AhcWebSocketConduit(org.apache.cxf.transport.websocket.ahc.AhcWebSocketConduit) HTTPConduitConfigurer(org.apache.cxf.transport.http.HTTPConduitConfigurer)

Aggregations

HTTPConduit (org.apache.cxf.transport.http.HTTPConduit)1 HTTPConduitConfigurer (org.apache.cxf.transport.http.HTTPConduitConfigurer)1 AhcWebSocketConduit (org.apache.cxf.transport.websocket.ahc.AhcWebSocketConduit)1