Class ClientUpgradeRequest

java.lang.Object
org.eclipse.jetty.websocket.common.UpgradeRequestAdapter
org.eclipse.jetty.websocket.client.ClientUpgradeRequest
All Implemented Interfaces:
UpgradeRequest

public class ClientUpgradeRequest extends UpgradeRequestAdapter
Allowing a generate from a UpgradeRequest
  • Field Details

    • FORBIDDEN_HEADERS

      private static final Set<String> FORBIDDEN_HEADERS
    • key

      private final String key
    • localEndpoint

      private Object localEndpoint
    • timeout

      private long timeout
  • Constructor Details

    • ClientUpgradeRequest

      public ClientUpgradeRequest()
    • ClientUpgradeRequest

      protected ClientUpgradeRequest(URI requestURI)
    • ClientUpgradeRequest

      public ClientUpgradeRequest(WebSocketUpgradeRequest wsRequest)
  • Method Details

    • genRandomKey

      private final String genRandomKey()
    • getKey

      public String getKey()
    • setCookiesFrom

      @Deprecated public void setCookiesFrom(CookieStore cookieStore)
      Deprecated.
      use either WebSocketClient.setCookieStore(CookieStore) or HttpClient.setCookieStore(CookieStore) instead
      Parameters:
      cookieStore - the cookie store to use
    • setRequestURI

      public void setRequestURI(URI uri)
      Description copied from interface: UpgradeRequest
      Set the Request URI to use for this request.

      Must be an absolute URI with scheme 'ws' or 'wss'

      Specified by:
      setRequestURI in interface UpgradeRequest
      Overrides:
      setRequestURI in class UpgradeRequestAdapter
      Parameters:
      uri - the Request URI
    • setTimeout

      public void setTimeout(long timeout, TimeUnit unit)
      Parameters:
      timeout - the total timeout for the request/response conversation of the WebSocket handshake; use zero or a negative value to disable the timeout
      unit - the timeout unit
    • getTimeout

      public long getTimeout()
      Returns:
      the total timeout for this request, in milliseconds; zero or negative if the timeout is disabled
    • setLocalEndpoint

      public void setLocalEndpoint(Object websocket)
    • getLocalEndpoint

      public Object getLocalEndpoint()