public class HostDesc extends Object
Constructor and Description |
---|
HostDesc(String protocol,
boolean isSecure,
String hostPort,
AuthDesc auth,
int retryInterval,
boolean dontLog)
Constructor.
|
HostDesc(String protocol,
String hostPort)
Constructor, taking most defaults.
|
Modifier and Type | Method and Description |
---|---|
AuthDesc |
auth()
Get this host's authorization information.
|
boolean |
dontLog()
Test if this host descriptor says not to log traffic.
|
static HostDesc |
fromProperties(BootProperties props,
String propRoot)
Create a HostDesc object from specifications provided by properties:
|
String |
hostPort()
Get this host's contact address.
|
String |
protocol()
Get this host's protocol.
|
int |
retryInterval()
Get this host's retry interval.
|
public HostDesc(String protocol, boolean isSecure, String hostPort, AuthDesc auth, int retryInterval, boolean dontLog)
protocol
- Protocol spoken.isSecure
- Flag that is true if protocol is secure.hostPort
- Host/port/path to address for service.auth
- Authorization.retryInterval
- Connection retry interval, in seconds, or -1 to
accept the default (currently 15).dontLog
- Flag not to log traffic when communicating to host.public boolean dontLog()
public static HostDesc fromProperties(BootProperties props, String propRoot)
"propRoot.host" should contain a host:port
string.
"propRoot.protocol", if given, should specify a protocol
name. If not given, the protocol defaults to "tcp".
"propRoot.dontlog", a boolean, if given and true,
indicates that message traffic on a connection to this host should
not be logged.
"propRoot.retry", an integer, if given, is the retry
interval, in seconds.
props
- Properties to examine for a host description.propRoot
- Root property name.public AuthDesc auth()
public String hostPort()
public String protocol()
public int retryInterval()
Copyright © 2017. All rights reserved.