Package | Description |
---|---|
java.net.http |
High level HTTP and WebSocket API
|
Modifier and Type | Method and Description |
---|---|
WebSocket.Builder |
WebSocket.Builder.connectTimeout(Duration timeout)
Sets a timeout for the opening handshake.
|
WebSocket.Builder |
WebSocket.Builder.header(String name,
String value)
Adds the given name-value pair to the list of additional headers for
the opening handshake.
|
static WebSocket.Builder |
WebSocket.newBuilder(URI uri,
HttpClient client,
WebSocket.Listener listener)
Creates a builder of
WebSocket s connected to the given URI and
receiving events with the given Listener . |
static WebSocket.Builder |
WebSocket.newBuilder(URI uri,
WebSocket.Listener listener)
Creates a builder of
WebSocket s connected to the given URI and
receiving events with the given Listener . |
WebSocket.Builder |
WebSocket.Builder.subprotocols(String mostPreferred,
String... lesserPreferred)
Includes a request for the given subprotocols during the opening
handshake.
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-ea+126