public interface CommandTransferClient
This is the interface to the underlying network library that serializes and transfers the Commands produced
by this framework.
All methods defined in here are intended to be used by SynchronizeFxClient and not by the user.
Any implementation must be capable of transferring all classes in the package
de.saxsys.synchronizefx.core.metamodel.commands, the class java.util.UUID and all classes of the user
domain model that doesn't contain any Fields that extend Property. You may wan't the user to provide them
manually if your implementation hasn't any generic system to handle any Object that is thrown on it.
It is guaranteed that setTopologyCallback(NetworkToTopologyCallbackClient) is only
called before connect() and send(List) only after
connect() (maybe multiple times). It is also guaranteed that no more methods are called
after disconnect() was called.
If you support user supplied serializers, please use the Serializer interface for them. This way serializers
are usable for multiple CommandTransferClient implementations.
This is the client side. For the server side see CommandTransferServer.
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Open the connection to the server.
|
void |
disconnect()
Closes the connection to the server.
|
void |
send(List<Command> commands)
Sends commands to the server.
|
void |
setTopologyCallback(NetworkToTopologyCallbackClient callback)
Sets the callback to the topology layer for events like incoming commands or errors.
|
void setTopologyCallback(NetworkToTopologyCallbackClient callback)
callback - The callbackvoid connect()
throws SynchronizeFXException
SynchronizeFXException - When the connection to the server failed.void send(List<Command> commands)
commands - The commands to send. The commands don't need to be send all at once but their order must not be
changed.void disconnect()
Copyright © 2016 Saxonia Systems AG. All Rights Reserved.