public class SynchronizeFxClient extends Object
SynchronizeFxServer. All fields of the model that implement the Property interface will be
synchronized between all clients.| Constructor and Description |
|---|
SynchronizeFxClient(CommandTransferClient networkLayer,
ClientCallback listener)
Sets up everything that is needed to to get the domain model instance from the server.
|
SynchronizeFxClient(CommandTransferClient networkLayer,
ClientCallback listener,
Executor changeExecutor)
Sets up everything that is needed to to get the domain model instance from the server.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Connects to the server and requests the domain model from it.
|
void |
disconnect()
Terminates the connection to the server.
|
public SynchronizeFxClient(CommandTransferClient networkLayer, ClientCallback listener)
This method doesn't connect to the server. Use connect() for that. Using this
constructor all changes done to JavaFX properties will be executed in the JavaFX GUI Thread.
networkLayer - An object that does the serialization and the network transfer of the data generated to
keep models synchron.listener - Used to inform the user of this class on errors and when the initial transfer of the domain
model is ready. The methods in the callback are not called before you call
connect()public SynchronizeFxClient(CommandTransferClient networkLayer, ClientCallback listener, Executor changeExecutor)
This method doesn't connect to the server. Use connect() for that. Using this
constructor all changes done to JavaFX properties will be executed using the Executor passed as
argument.
networkLayer - An object that does the serialization and the network transfer of the data generated to
keep models synchron.listener - Used to inform the user of this class on errors and when the initial transfer of the domain
model is ready. The methods in the callback are not called before you call
connect()changeExecutor - An executor that is used for all changes done to JavaFX properties.public void connect()
ClientCallback.modelReady(Object) method on the instance supplied by the user in the constructor.public void disconnect()
Copyright © 2014 Saxonia Systems AG. All Rights Reserved.