public class ServerConnector extends Object
ServerRpcQueue.| Constructor and Description |
|---|
ServerConnector(Registry registry)
Creates a new instance connected to the given registry.
|
| Modifier and Type | Method and Description |
|---|---|
void |
sendEventMessage(int nodeId,
String eventType,
elemental.json.JsonObject eventData)
Sends an event message to the server.
|
void |
sendEventMessage(StateNode node,
String eventType,
elemental.json.JsonObject eventData)
Sends an event message to the server.
|
void |
sendExistingElementAttachToServer(StateNode parent,
int requestedId,
int assignedId,
String tagName,
int index)
Sends a data for attach existing element server side callback.
|
void |
sendExistingElementWithIdAttachToServer(StateNode parent,
int requestedId,
int assignedId,
String id)
Sends a data for attach existing element with id server side callback.
|
void |
sendNavigationMessage(String location,
Object stateObject,
boolean routerLinkEvent)
Sends a navigation message to server.
|
void |
sendNodeSyncMessage(StateNode node,
int feature,
String key,
Object value)
Sends a node value sync message to the server.
|
void |
sendReturnChannelMessage(int stateNodeId,
int channelId,
elemental.json.JsonArray arguments)
Sends a return channel message to the server.
|
void |
sendTemplateEventMessage(StateNode node,
String methodName,
elemental.json.JsonArray argsArray,
int promiseId)
Sends a template event message to the server.
|
public ServerConnector(Registry registry)
registry - the global registrypublic void sendNavigationMessage(String location, Object stateObject, boolean routerLinkEvent)
location - the relative location of the navigationstateObject - the state object or null if none applicablerouterLinkEvent - true if this event was triggered by interaction
with a router link; false if triggered by history
navigationpublic void sendEventMessage(StateNode node, String eventType, elemental.json.JsonObject eventData)
node - the node that listened to the eventeventType - the type of eventeventData - extra data associated with the eventpublic void sendEventMessage(int nodeId,
String eventType,
elemental.json.JsonObject eventData)
nodeId - the id of the node that listened to the eventeventType - the type of eventeventData - extra data associated with the eventpublic void sendTemplateEventMessage(StateNode node, String methodName, elemental.json.JsonArray argsArray, int promiseId)
node - the node that listened to the eventmethodName - the event handler method name to execute on the server sideargsArray - the arguments array for the methodpromiseId - the promise id to use for getting the result back, or -1 if no
result is expectedpublic void sendNodeSyncMessage(StateNode node, int feature, String key, Object value)
node - the node to updatefeature - the id of the node map feature to updatekey - the map key to updatevalue - the new valuepublic void sendExistingElementAttachToServer(StateNode parent, int requestedId, int assignedId, String tagName, int index)
parent - parent of the node to attachrequestedId - originally requested id of a server side nodeassignedId - identifier which should be used on the server side for the
element (instead of requestedId)tagName - the requested tagNameindex - the index of the element on the server sidepublic void sendExistingElementWithIdAttachToServer(StateNode parent, int requestedId, int assignedId, String id)
parent - parent of the node to attachrequestedId - originally requested id of a server side nodeassignedId - identifier which should be used on the server side for the
element (instead of requestedId)id - id of requested elementpublic void sendReturnChannelMessage(int stateNodeId,
int channelId,
elemental.json.JsonArray arguments)
stateNodeId - the id of the state node that owns the channel.channelId - the id of the channel.arguments - array of arguments passed to the channel, not
null.Copyright © 2000–2026 Vaadin Ltd. All rights reserved.