public class Roster extends Object
| Constructor and Description |
|---|
Roster(List<ServerIdentity> servers) |
Roster(OnetProto.Roster roster) |
| Modifier and Type | Method and Description |
|---|---|
static Roster |
FromToml(String groupToml) |
List<ServerIdentity> |
getNodes() |
ServerIdentity.StreamingConn |
makeStreamingConn(String path,
com.google.protobuf.GeneratedMessageV3 proto,
ServerIdentity.StreamHandler h)
Sends a request to initialise a streaming connection.
|
com.google.protobuf.ByteString |
sendMessage(String path,
com.google.protobuf.GeneratedMessageV3 proto)
Synchronously sends a message.
|
OnetProto.Roster |
toProto() |
public Roster(List<ServerIdentity> servers)
public Roster(OnetProto.Roster roster) throws URISyntaxException
URISyntaxExceptionpublic List<ServerIdentity> getNodes()
public OnetProto.Roster toProto()
public com.google.protobuf.ByteString sendMessage(String path, com.google.protobuf.GeneratedMessageV3 proto) throws CothorityCommunicationException
path - The API endpoint.proto - The protobuf encoded request.CothorityCommunicationException - if something went wrongpublic ServerIdentity.StreamingConn makeStreamingConn(String path, com.google.protobuf.GeneratedMessageV3 proto, ServerIdentity.StreamHandler h) throws CothorityCommunicationException
path - The API endpoint, note that this endpoint must support streaming (registered using RegisterStreamingRequest in the Go side).proto - The protobuf encoded request.h - The handler for handling responses.CothorityCommunicationException - if something went wrongCopyright © 2018. All rights reserved.