public static class OnapMsgRouterPublisher.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
OnapMsgRouterPublisher.Builder |
asUser(String user,
String pwd)
Set HTTP basic auth credentials.
|
OnapMsgRouterPublisher |
build()
Build the publisher given this specification.
|
OnapMsgRouterPublisher.Builder |
defaultHttp()
If no protocol is provided on a host string, default to http://
|
OnapMsgRouterPublisher.Builder |
defaultHttps()
If no protocol is provided on a host string, default to https://
|
OnapMsgRouterPublisher.Builder |
defaultHttps(boolean https)
If no protocol is provided on a host string, default to https:// if true,
http:// if false.
|
OnapMsgRouterPublisher.Builder |
forgetHosts()
Clear any hosts the builder already knows about.
|
OnapMsgRouterPublisher.Builder |
logTo(org.slf4j.Logger log)
Specify the log to use.
|
OnapMsgRouterPublisher.Builder |
onTopic(String topic)
Specify the topic to publish to.
|
OnapMsgRouterPublisher.Builder |
waitingAtMost(long ms)
Specify the amount of time to wait on a socket connection, read, or write.
|
OnapMsgRouterPublisher.Builder |
withClock(OnapMsgRouterPublisher.Clock clock) |
OnapMsgRouterPublisher.Builder |
withHost(String host)
Add a host to set the publisher can use.
|
OnapMsgRouterPublisher.Builder |
withHosts(Collection<String> hosts)
Add each host to the host list.
|
OnapMsgRouterPublisher.Builder |
withHosts(String[] hosts)
Add each host to the host list.
|
public OnapMsgRouterPublisher.Builder withHost(String host)
host - the host to add to the host setpublic OnapMsgRouterPublisher.Builder withHosts(Collection<String> hosts)
hosts - a collection of hosts to add to the host setpublic OnapMsgRouterPublisher.Builder withHosts(String[] hosts)
hosts - a collection of hosts to add to the host setpublic OnapMsgRouterPublisher.Builder forgetHosts()
public OnapMsgRouterPublisher.Builder onTopic(String topic)
topic - the topic on which to post messagespublic OnapMsgRouterPublisher.Builder waitingAtMost(long ms)
ms - the number of milliseconds to wait for a socket operation (connect/read/write)public OnapMsgRouterPublisher.Builder logTo(org.slf4j.Logger log)
log - the slf4j logger to use for this library. Do not pass null.public OnapMsgRouterPublisher.Builder asUser(String user, String pwd)
user - the username for basic auth credentialspwd - the password for basic auth credentialspublic OnapMsgRouterPublisher.Builder defaultHttp()
public OnapMsgRouterPublisher.Builder defaultHttps()
public OnapMsgRouterPublisher.Builder defaultHttps(boolean https)
https - if true, use https. if false, use httppublic OnapMsgRouterPublisher.Builder withClock(OnapMsgRouterPublisher.Clock clock)
public OnapMsgRouterPublisher build()
Copyright © 2019 continual.io. All rights reserved.