public final class Scion extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Scion.CloseableService |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeDefault() |
static ScionService |
defaultService()
Returns the default instance of the ScionService.
|
static Scion.CloseableService |
newServiceWithBootstrapServer(String hostAndPort)
Create a new service instance that uses a bootstrap server host/port to locate a control
server.
|
static Scion.CloseableService |
newServiceWithDaemon(String hostAndPort)
Create a new service instance that connects to a daemon.
|
static Scion.CloseableService |
newServiceWithDNS(String hostName)
Create a new service instance that uses DNS NAPTR entries to connect to a control service.
|
static Scion.CloseableService |
newServiceWithTopologyFile(String filePath)
Create a new service instance that reads a topology file to determine the address of a control
server.
|
public static ScionService defaultService()
If no default instance is available, it will try to create an instance as follows:
- CHeck and try daemon port/host
- Check and try properties/environment for topology file location
- Check and try properties/environment for bootstrap server IP address
- Check and try properties/environment for DNS NAPTR record entry name
public static void closeDefault()
public static Scion.CloseableService newServiceWithDaemon(String hostAndPort)
defaultService().hostAndPort - of the local daemon in the form of IP:portpublic static Scion.CloseableService newServiceWithDNS(String hostName)
defaultService().hostName - of the host whose DNS entry contains hints for control service etc.public static Scion.CloseableService newServiceWithBootstrapServer(String hostAndPort)
defaultService().hostAndPort - of the bootstrap server.public static Scion.CloseableService newServiceWithTopologyFile(String filePath)
defaultService().filePath - name (and location) of the topology json file.Copyright © 2024. All rights reserved.