public static class OnapMsgRouterPublisher.Builder extends CommonClientBuilder
| 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 |
usingProxy(String proxy)
Specify a proxy to use for the HTTP connection to Message Router.
|
OnapMsgRouterPublisher.Builder |
usingProxy(String host,
int port)
Specify a proxy to use for the HTTP connection to Message Router.
|
OnapMsgRouterPublisher.Builder |
waitingAtMost(long ms)
Specify the amount of time to wait on a socket connection, read, or write.
|
OnapMsgRouterPublisher.Builder |
withApiKey(String apiKey,
String apiSecret)
Set an API key and secret.
|
OnapMsgRouterPublisher.Builder |
withClock(Clock clock)
Specify a clock to use within this implementation.
|
OnapMsgRouterPublisher.Builder |
withHost(String host)
Add a host to the 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.
|
getClock, getCredentials, getDefaultHttps, getHosts, getLog, getProxy, getProxyHost, getProxyPort, getSocketWaitMs, getTopic, isProxied, socketWaitAtMostpublic OnapMsgRouterPublisher.Builder withHost(String host)
withHost in class CommonClientBuilderhost - the host to add to the host setpublic OnapMsgRouterPublisher.Builder withHosts(Collection<String> hosts)
withHosts in class CommonClientBuilderhosts - a collection of hosts to add to the host setpublic OnapMsgRouterPublisher.Builder withHosts(String[] hosts)
withHosts in class CommonClientBuilderhosts - a collection of hosts to add to the host setpublic OnapMsgRouterPublisher.Builder forgetHosts()
forgetHosts in class CommonClientBuilderpublic OnapMsgRouterPublisher.Builder onTopic(String topic)
onTopic in class CommonClientBuildertopic - the topic on which to post messagespublic OnapMsgRouterPublisher.Builder waitingAtMost(long ms)
waitingAtMost in class CommonClientBuilderms - the number of milliseconds to wait for a socket operation (connect/read/write)public OnapMsgRouterPublisher.Builder logTo(org.slf4j.Logger log)
logTo in class CommonClientBuilderlog - the slf4j logger to use for this library. Do not pass null.public OnapMsgRouterPublisher.Builder asUser(String user, String pwd)
asUser in class CommonClientBuilderuser - the username for basic auth credentialspwd - the password for basic auth credentialspublic OnapMsgRouterPublisher.Builder withApiKey(String apiKey, String apiSecret)
withApiKey in class CommonClientBuilderapiKey - the API key for the userapiSecret - the API key's secretpublic OnapMsgRouterPublisher.Builder defaultHttp()
defaultHttp in class CommonClientBuilderpublic OnapMsgRouterPublisher.Builder defaultHttps()
defaultHttps in class CommonClientBuilderpublic OnapMsgRouterPublisher.Builder defaultHttps(boolean https)
defaultHttps in class CommonClientBuilderhttps - if true, use https. if false, use httppublic OnapMsgRouterPublisher.Builder withClock(Clock clock)
withClock in class CommonClientBuilderclock - the clock to use for timingpublic OnapMsgRouterPublisher.Builder usingProxy(String proxy)
usingProxy in class CommonClientBuilderproxy - a proxy string, which can optionally end in :port, e.g. proxy.example.com:8888public OnapMsgRouterPublisher.Builder usingProxy(String host, int port)
usingProxy in class CommonClientBuilderhost - a proxy host nameport - a port numberpublic OnapMsgRouterPublisher build()
Copyright © 2024 continual.io. All rights reserved.