public class SiLAManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SiLAManager.SiLAServerListener
Listener for 3rd Party Applications
|
| Modifier and Type | Method and Description |
|---|---|
void |
addServer(String host,
int port)
Add Server manually to cache
|
void |
addServer(String host,
int port,
UUID discoveryId)
Add Server to Cache with Discovery Id
|
void |
addSiLAServerListener(SiLAManager.SiLAServerListener siLAServerListener)
Add additional listener to retrieve SiLA Server information in-process
|
void |
blockUntilServerFound(String serverName,
int timeOut)
Blocking call until online server is found in cache
|
static SiLAManager |
getInstance() |
Map<UUID,SiLAConnection> |
getSilaConnections()
Get Map of managed SiLA Connections
|
Map<UUID,Server> |
getSiLAServers()
Get Map of managed SiLA Servers
|
List<Server> |
getSiLAServersByName(String serverName)
Get a List of Servers with Server Name
|
void |
initialize(Map<UUID,Server> silaServers)
Initialise SiLA Manager with pre-defined SiLA Servers, e.g.
|
ServerCallExecutor |
newCallExecutor(SiLACall siLACall)
Getting SiLA Call Executor from a SiLA Call defining it
|
void |
removeServer(UUID id)
Removing Server manually
|
void |
removeSiLAServerListener(SiLAManager.SiLAServerListener siLAServerListener) |
void |
setServerStatus(UUID id,
Server.Status status)
Set the Status of a Server
|
void |
startDiscovery()
Enable SiLA Discovery
|
void |
startHeartbeat()
Start Heartbeat to check Status of Servers
|
void |
stopDiscovery()
Disable SiLA Discovery
|
void |
stopHeartbeat()
Stop Heartbeat
|
public static SiLAManager getInstance()
public void initialize(@NonNull
Map<UUID,Server> silaServers)
silaServers - Map containing all predefined SiLAServerspublic void startDiscovery()
public void stopDiscovery()
public void startHeartbeat()
public void stopHeartbeat()
public void addServer(@NonNull
String host,
int port)
host - Host on which SiLA Server is exposedport - Port on which SiLA Server is exposedpublic void removeServer(@NonNull
UUID id)
id - Server Id used for referencing to the Serverpublic void addServer(@NonNull
String host,
int port,
@Nullable
UUID discoveryId)
host - Host on which SiLA Server is exposedport - Port on which SiLA Server is exposeddiscoveryId - Discovery ID (provided by mDNS)public void setServerStatus(@NonNull
UUID id,
@NonNull
Server.Status status)
id - Server Idstatus - Server Statuspublic Map<UUID,SiLAConnection> getSilaConnections()
public List<Server> getSiLAServersByName(@NonNull String serverName)
serverName - SiLA Server Name (configurable)public void addSiLAServerListener(@Nonnull SiLAManager.SiLAServerListener siLAServerListener)
public void removeSiLAServerListener(@Nonnull SiLAManager.SiLAServerListener siLAServerListener)
public ServerCallExecutor newCallExecutor(@NonNull SiLACall siLACall) throws KeyException
KeyExceptionpublic void blockUntilServerFound(@NonNull
String serverName,
int timeOut)
throws TimeoutException
serverName - SiLA Server Name (configurable)timeOut - in msTimeoutException - when the server could not be found within the timeOut periodCopyright © 2019. All rights reserved.