public class Synchronizer extends Object
| Constructor and Description |
|---|
Synchronizer(org.springframework.web.socket.WebSocketSession session)
Create a synchronizer for the specific web socket session.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the client invocation queue.
|
Synchronizer |
createWidget(BaseComponent parent,
OptionMap props,
OptionMap state)
Creates and sends a client invocation to create a widget.
|
Synchronizer |
invokeClient(IElementIdentifier component,
String function,
IResponseCallback<?> callback,
Object... args)
Creates and sends a client invocation to invoke a specified function on a component.
|
Synchronizer |
invokeClient(IElementIdentifier component,
String function,
Object... args)
Creates and sends a client invocation to invoke a specified function on a component.
|
Synchronizer |
processQueue(ClientInvocationQueue queue)
Process queued client invocations.
|
Synchronizer |
sendToClient(ClientInvocation invocation)
Sends (or queues) a client invocation.
|
Synchronizer |
sendToClient(Collection<ClientInvocation> invocations)
Sends (or queues) multiple client invocations.
|
void |
startQueueing()
Activate queueing.
|
void |
stopQueueing()
Deactivate queueing.
|
public Synchronizer(org.springframework.web.socket.WebSocketSession session)
session - The web socket session.public void startQueueing()
public void stopQueueing()
public void clear()
public Synchronizer createWidget(BaseComponent parent, OptionMap props, OptionMap state)
parent - Parent of the new widget.props - Property values used to initialize the new widget.state - State values used to initialize the new widget.public Synchronizer processQueue(ClientInvocationQueue queue)
queue - A client invocation queue.public Synchronizer invokeClient(IElementIdentifier component, String function, Object... args)
component - Identifier of component whose function is to be invoked.function - Name of the function to be invoked.args - Arguments to pass to the functions.public Synchronizer invokeClient(IElementIdentifier component, String function, IResponseCallback<?> callback, Object... args)
component - Identifier of component whose function is to be invoked.function - Name of the function to be invoked.callback - Optional callback.args - Arguments to pass to the functions.public Synchronizer sendToClient(ClientInvocation invocation)
invocation - Client invocation.public Synchronizer sendToClient(Collection<ClientInvocation> invocations)
invocations - List of client invocations.Copyright © 2018 Fujion Framework. All rights reserved.