public class NettyClient extends Object implements MessageTransferClient
SynchronizeFxClient.| Modifier and Type | Field and Description |
|---|---|
protected Serializer |
serializer
The serializer that should be used to serialize SynchronizeFX messages.
|
| Constructor and Description |
|---|
NettyClient(String serverAdress,
int port,
Serializer serializer)
Takes the required informations to connect to a server but doesn't actually connect to it.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<Object>[] |
chunk(List<Object> messages)
Splits a big list of messages which should be send into smaller lists of messages that can be send
individually.
|
void |
connect() |
void |
disconnect() |
void |
send(List<Object> messages) |
void |
setTopologyCallback(NetworkToTopologyCallbackClient callback) |
protected final Serializer serializer
public NettyClient(String serverAdress, int port, Serializer serializer)
SynchronizeFxClient.serverAdress - The domain name or IP address of a server to connect to.port - The port of the server to connect to.serializer - The serializer that should be used to serialize SynchronizeFX messages.public void setTopologyCallback(NetworkToTopologyCallbackClient callback)
setTopologyCallback in interface MessageTransferClientpublic void connect()
throws SynchronizeFXException
connect in interface MessageTransferClientSynchronizeFXExceptionpublic void send(List<Object> messages)
send in interface MessageTransferClientpublic void disconnect()
disconnect in interface MessageTransferClientprotected List<Object>[] chunk(List<Object> messages)
NettyEndPoint.CHUNK_SIZE elements. All
other lists have NettyEndPoint.CHUNK_SIZE elements.messages - the big list that be split.Copyright © 2014 Saxonia Systems AG. All Rights Reserved.