org.springframework.web.socket.sockjs.client

## Interface Transport

All Known Subinterfaces:
  XhrTransport

All Known Implementing Classes:
  AbstractXhrTransport, JettyXhrTransport, RestTemplateXhrTransport, UndertowXhrTransport, WebSocketTransport

    public interface Transport

A client-side implementation for a SockJS transport.

Since:
  4.1
Author:
  Rossen Stoyanchev

### Method Summary

All Methods Instance Methods Abstract Methods
`org.springframework.util.concurrent.ListenableFuture<WebSocketSession>` `connect(TransportRequest request, WebSocketHandler webSocketHandler)` Connect the transport.
`List<TransportType>` `getTransportTypes()` Return the SockJS transport types that this transport can be used for.

### Method Detail

#### getTransportTypes

    List<TransportType> getTransportTypes()

Return the SockJS transport types that this transport can be used for. In particular since from a client perspective there is no difference between XHR and XHR streaming, an `XhrTransport` could do both.

#### connect

    org.springframework.util.concurrent.ListenableFuture<WebSocketSession> connect(TransportRequest request,
                                                                                   WebSocketHandler webSocketHandler)

Connect the transport.

Parameters:
  `request` - the transport request.
  `webSocketHandler` - the application handler to delegate lifecycle events to.
Returns:
  a future to indicate success or failure to connect.