public class StaticServiceDiscovery extends DefaultServiceDiscovery
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
StaticServiceDiscovery() |
StaticServiceDiscovery(List<ServiceDefinition> servers) |
Modifier and Type | Method and Description |
---|---|
void |
addServer(ServiceDefinition server)
Add a server to the known list of servers.
|
void |
addServer(String serverString)
Add a server to the known list of servers.
|
void |
addServer(String host,
int port)
Add a server to the known list of servers.
|
void |
addServer(String name,
String host,
int port)
Add a server to the known list of servers.
|
void |
addServer(String name,
String host,
int port,
Map<String,String> meta)
Add a server to the known list of servers.
|
void |
addServers(String serviceName,
List<String> servers) |
static StaticServiceDiscovery |
forServices(Collection<ServiceDefinition> definitions) |
static StaticServiceDiscovery |
forServices(ServiceDefinition... definitions) |
List<ServiceDefinition> |
getServices(String name)
Gets the list of services.
|
void |
removeServer(String host,
int port)
Remove an existing server from the list of known servers.
|
void |
removeServer(String name,
String host,
int port)
Remove an existing server from the list of known servers.
|
void |
setServers(List<String> servers)
Set the servers.
|
void |
setServers(String servers)
Set the servers.
|
doStart, doStop, getCamelContext, setCamelContext
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public StaticServiceDiscovery()
public StaticServiceDiscovery(List<ServiceDefinition> servers)
public void setServers(List<String> servers)
servers
- server in the format: [service@]host:port.public void addServers(String serviceName, List<String> servers)
public void setServers(String servers)
servers
- servers separated by comma in the format: [service@]host:port,[service@]host2:port,[service@]host3:port and so on.public void addServer(ServiceDefinition server)
public void addServer(String serverString)
serverString
- servers separated by comma in the format: [service@]host:port,[service@]host2:port,[service@]host3:port and so on.public void addServer(String name, String host, int port)
public void addServer(String name, String host, int port, Map<String,String> meta)
public void removeServer(String host, int port)
public void removeServer(String name, String host, int port)
public List<ServiceDefinition> getServices(String name)
ServiceDiscovery
getServices
in interface ServiceDiscovery
getServices
in class DefaultServiceDiscovery
name
- the service namepublic static StaticServiceDiscovery forServices(Collection<ServiceDefinition> definitions)
public static StaticServiceDiscovery forServices(ServiceDefinition... definitions)
Apache Camel