Package com.vaadin.client.communication
Class XhrConnection
- java.lang.Object
-
- com.vaadin.client.communication.XhrConnection
-
public class XhrConnection extends Object
Provides a connection to the UIDL request handler on the server and knows how to send messages to that end point.- Since:
- 1.0
- Author:
- Vaadin Ltd
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classXhrConnection.XhrResponseHandlerHandles the response from the server by forwarding the received message toMessageHandleror failures to the appropriate method inConnectionStateHandler.
-
Constructor Summary
Constructors Constructor Description XhrConnection(Registry registry)Creates a new instance connected to the given registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected XhrConnection.XhrResponseHandlercreateResponseHandler()protected StringgetUri()Retrieves the URI to use when sending RPCs to the servervoidsend(elemental.json.JsonObject payload)Sends an asynchronous UIDL request to the server using the given URI.
-
-
-
Constructor Detail
-
XhrConnection
public XhrConnection(Registry registry)
Creates a new instance connected to the given registry.- Parameters:
registry- the global registry
-
-
Method Detail
-
createResponseHandler
protected XhrConnection.XhrResponseHandler createResponseHandler()
-
send
public void send(elemental.json.JsonObject payload)
Sends an asynchronous UIDL request to the server using the given URI.- Parameters:
payload- The URI to use for the request. May includes GET parameters
-
getUri
protected String getUri()
Retrieves the URI to use when sending RPCs to the server- Returns:
- The URI to use for server messages.
-
-