public class ServerIdentity extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ServerIdentity.StreamHandler
The default handler interface for handling streaming responses.
|
class |
ServerIdentity.StreamingConn |
class |
ServerIdentity.SyncSendMessage |
| Constructor and Description |
|---|
ServerIdentity(NetworkProto.ServerIdentity sid) |
ServerIdentity(ServerToml toml) |
ServerIdentity(URI serverWsAddress,
Point pubkey) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
URI |
getAddress() |
Point |
getPublic() |
List<ServiceIdentity> |
getServiceIdentities() |
Point |
getServicePublic(String serviceName)
Get the public key for the given service name.
|
StatusProto.Response |
GetStatus() |
int |
hashCode() |
ServerIdentity.StreamingConn |
MakeStreamingConnection(String path,
byte[] data,
ServerIdentity.StreamHandler h)
Make a streaming connection.
|
byte[] |
SendMessage(String path,
byte[] data)
Synchronously send a message.
|
NetworkProto.ServerIdentity |
toProto() |
String |
toString() |
public ServerIdentity(ServerToml toml) throws URISyntaxException
URISyntaxExceptionpublic ServerIdentity(NetworkProto.ServerIdentity sid) throws URISyntaxException
URISyntaxExceptionpublic URI getAddress()
public Point getPublic()
public Point getServicePublic(String serviceName)
public List<ServiceIdentity> getServiceIdentities()
public StatusProto.Response GetStatus() throws CothorityCommunicationException
CothorityCommunicationExceptionpublic NetworkProto.ServerIdentity toProto()
public byte[] SendMessage(String path, byte[] data) throws CothorityCommunicationException
path - The API endpoint.data - The request message.CothorityCommunicationException - if something went wrongpublic ServerIdentity.StreamingConn MakeStreamingConnection(String path, byte[] data, ServerIdentity.StreamHandler h) throws CothorityCommunicationException
path - The API endpoint.data - The request message.h - The handler for handling every response.CothorityCommunicationException - if something went wrongCopyright © 2019. All rights reserved.