public interface MessageTransferClient
This is the interface to the underlying network library that serializes and transfers the messages 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 MessageTransferClient implementations.
This is the client side. For the server side see MessageTransferServer.
| 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<Object> messages)
Sends messages to the server.
|
void |
setTopologyCallback(NetworkToTopologyCallbackClient callback)
Sets the callback to the topology layer for events like incoming messages or errors.
|
void setTopologyCallback(NetworkToTopologyCallbackClient callback)
callback - The callbackvoid connect()
throws SynchronizeFXException
SynchronizeFXException - When the connection to the server failed.void send(List<Object> messages)
messages - the messages to send. The messages don't need to be send all at once but their order must not
be changed.void disconnect()
Copyright © 2014 Saxonia Systems AG. All Rights Reserved.