public final class ChannelNameResolverConfiguration extends Object
ChannelNameResolver
.Constructor and Description |
---|
ChannelNameResolverConfiguration()
Creates a configuration for a channel-name resolver using environment
variables.
|
ChannelNameResolverConfiguration(Charset charset,
ErrorHandler errorHandler,
Integer defaultServerPort,
Set<Pair<Inet4Address,Integer>> tcpAddresses,
Set<Pair<Inet4Address,Integer>> udpAddresses,
Boolean autoDetermineAddresses,
Double maximumSearchPeriod)
Creates a channel-name resolver configuration using the specified
options.
|
Modifier and Type | Method and Description |
---|---|
Charset |
getCharset()
Returns the character set that should be used for encoding and decoding
channel names.
|
int |
getDefaultServerPort()
Returns the TCP and UDP port that should be used when connecting to a
server for name resolution and no port has been specified for this server
explicitly.
|
ErrorHandler |
getErrorHandler()
Returns the error handler that should be used by the channel-name
resolver.
|
double |
getMaximumSearchPeriod()
Returns the maximum search period (in seconds).
|
Set<InetSocketAddress> |
getTcpAddresses()
Returns socket addresses of server addresses that should be contacted via
TCP for name resolution.
|
Set<InetSocketAddress> |
getUdpAddresses()
Returns socket addresses of server addresses and broadcast addresses that
should be contacted via UDP for name resolution.
|
boolean |
isAutoDetermineAddresses()
Returns whether the broadcast addresses for the local interfaces should
also be contacted via UDP, even if they are not explicitly listed in the
set returned by
getUdpAddresses() . |
public ChannelNameResolverConfiguration()
JavaUtilLoggingErrorHandler
. The EPICS_CA_ADDR_LIST
,
EPICS_CA_AUTO_ADDR_LIST
, EPICS_CA_NAME_SERVERS
,
EPICS_CA_SERVER_PORT
, and
EPICS_CA_MAX_SEARCH_PERIOD
environment variables are used
for initializing the other configuration options. They have exactly the
same meanings and default values as specified by the Channel Access
Reference Manual.public ChannelNameResolverConfiguration(Charset charset, ErrorHandler errorHandler, Integer defaultServerPort, Set<Pair<Inet4Address,Integer>> tcpAddresses, Set<Pair<Inet4Address,Integer>> udpAddresses, Boolean autoDetermineAddresses, Double maximumSearchPeriod)
null
is initialized from its
corresponding environment variable, as the constructor
ChannelNameResolverConfiguration()
does.charset
- character set used to encode and decode channel names. If this
parameter is null
the UTF-8 character set is
used. If the UTF-8 character set is not available on this
platform, the platform's default character set is used.errorHandler
- error handler which is used to log errors that are encountered
by the channel-name resolver or null
if a
JavaUtilLoggingErrorHandler
shall be used.defaultServerPort
- default port to assume for servers if no port is specified
explicitly or null
to use
EPICS_CA_SERVER_PORT
.tcpAddresses
- set of IP-address port pairs of channel name servers that
should be queried via TCP or null
to use
EPICS_CA_NAME_SERVERS
.udpAddresses
- set of IP-address port pairs of channel name servers or
broadcast addresses that should be queried via UDP or
null
to use EPICS_CA_ADDR_LIST
.autoDetermineAddresses
- true
if the broadcast addresses of all local
interfaces should be added to the set of addresses that are
queried via UDP, false
if those addresses should
not be added, and null
if
EPICS_CA_AUTO_ADDR_LIST
should be used.maximumSearchPeriod
- interval of the longest search period (in seconds) or
null
if EPICS_CA_MAX_SEARCH_PERIOD
should be used. The minimum value for this setting is 60. If
it is below 60, it is silently set to 60.IllegalArgumentException
- if defaultServerPort
is specified and zero or an
invalid port number and if tcpAddresses
or
udpAddresses
contains an entry with a zero or
invalid port number.public Charset getCharset()
public ErrorHandler getErrorHandler()
ExceptionSafeErrorHandler
.public int getDefaultServerPort()
public Set<InetSocketAddress> getTcpAddresses()
public Set<InetSocketAddress> getUdpAddresses()
public boolean isAutoDetermineAddresses()
getUdpAddresses()
.true
if the broadcast addresses of all local
interfaces should be used for name resolution, false
if only the explicitly configured address should be used.public double getMaximumSearchPeriod()
Copyright © 2014–2016 aquenos GmbH. All rights reserved.