use of com.microsoft.azure.proton.transport.ws.impl.WebSocketImpl in project azure-iot-sdk-java by Azure.
the class AmqpsConnection method onConnectionBound.
@Override
public void onConnectionBound(Event event) {
Transport transport = event.getConnection().getTransport();
if (transport != null) {
if (this.saslListener != null) {
log.debug("Setting up sasl negotiator");
// Calling sasl here adds a transport layer for handling sasl negotiation
transport.sasl().setListener(this.saslListener);
}
if (this.useWebSockets) {
log.debug("Adding websocket layer");
WebSocketImpl webSocket = new WebSocketImpl(MAX_MESSAGE_PAYLOAD_SIZE);
webSocket.configure(this.hostName, WEB_SOCKET_PATH, WEB_SOCKET_QUERY, AMQP_WEB_SOCKET_PORT, WEB_SOCKET_SUB_PROTOCOL, null, null);
((TransportInternal) transport).addTransportLayer(webSocket);
}
SslDomain domain = makeDomain();
transport.ssl(domain);
}
}
Aggregations