public final class ChannelAccessClientConfiguration extends Object
ChannelAccessClient
.Constructor and Description |
---|
ChannelAccessClientConfiguration()
Creates a configuration for a Channel Access client that uses default
values for all options.
|
ChannelAccessClientConfiguration(Charset charset,
String hostName,
String userName,
Integer maxPayloadReceiveSize,
Integer maxPayloadSendSize,
Long cidBlockReuseTime,
ChannelAccessEventMask defaultEventMask,
ErrorHandler errorHandler,
BeaconDetectorConfiguration beaconDetectorConfiguration,
ChannelNameResolverConfiguration resolverConfiguration)
Creates a configuration for a Channel Access client using the specified
options.
|
Modifier and Type | Method and Description |
---|---|
BeaconDetectorConfiguration |
getBeaconDetectorConfiguration()
Returns the configuration for the
BeaconDetector used by the
client. |
Charset |
getCharset()
Returns the character set that should be used for encoding and decoding
strings.
|
long |
getCIDBlockReuseTime()
Returns the time that a CID is blocked from being reused after the
corresponding channel has been destroyed.
|
ChannelAccessEventMask |
getDefaultEventMask()
Returns the default event mask.
|
ErrorHandler |
getErrorHandler()
Returns the error handler that is used by all client components, unless
there is a component-specific configuration that defines its own error
handler.
|
String |
getHostName()
Returns the host name that shall be used as the identification of the
local machine when connecting to a Channel Access server.
|
int |
getMaxPayloadReceiveSize()
Returns the maximum payload size for message received via TCP (in bytes).
|
int |
getMaxPayloadSendSize()
Returns the maximum payload size for message sent via TCP (in bytes).
|
ChannelNameResolverConfiguration |
getResolverConfiguration()
Returns the configuration for the
ChannelNameResolver used by the
client. |
String |
getUserName()
Returns the user name that shall be used as the identification of the
user when connecting to a Channel Access server.
|
public ChannelAccessClientConfiguration()
null
for
all parameters of the
ChannelAccessClientConfiguration(Charset, String, String, Integer, Integer, Long, ChannelAccessEventMask, ErrorHandler, BeaconDetectorConfiguration, ChannelNameResolverConfiguration)
constructor.public ChannelAccessClientConfiguration(Charset charset, String hostName, String userName, Integer maxPayloadReceiveSize, Integer maxPayloadSendSize, Long cidBlockReuseTime, ChannelAccessEventMask defaultEventMask, ErrorHandler errorHandler, BeaconDetectorConfiguration beaconDetectorConfiguration, ChannelNameResolverConfiguration resolverConfiguration)
null
is passed for an option, the default value
for this option is used.charset
- character set used to encode and decode strings. 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.hostName
- host name identifying the client computer when connecting to a
server. If null
the host name is determined
automatically using the HostNameUtil.getHostName()
method. If the host name cannot be determined automatically,
the special string "<unknown host>" is used.userName
- user name identifying the user when connecting to a server. If
null
the user name is determined automatically
using the UserNameUtil.getUserName()
method. If the
user name cannot be determined automatically, the empty string
is used.maxPayloadReceiveSize
- maximum size of the payload of a message received via TCP (in
bytes). This effectively limits the number of elements that
can be transferred from the server in a get operation for a
channel. Must be at least 16384 bytes. If null
the EPICS_CA_MAX_ARRAY_BYTES
environment variable
is used. If the environment variable is not set or its value
is invalid, a default value of 16384 bytes is used.maxPayloadSendSize
- maximum size of the payload of a message sent via TCP (in
bytes). This effectively limits the number of elements that
can be transferred to the server in a put operation for a
channel. Must be at least 16384 bytes. If null
the EPICS_CA_MAX_ARRAY_BYTES
environment variable
is used. If the environment variable is not set or its value
is invalid, a default value of 16384 bytes is useddefaultEventMask
- default event mask to use when creating monitors. If
null
an event mask of
DBE_VALUE|DBE_ALARM
is used. May not be
DBE_NONE
.cidBlockReuseTime
- time that a CID is blocked from being used again in
milliseconds. If null
a default value of 900000
milliseconds (15 minutes) is used. After destroying a channel,
the CID may not be reused for some time because there might
still be late responses to old search requests, which would be
used for the wrong channel if the CID was reused too early.errorHandler
- error handler to use for handling all errors in the client or
null
if the default error handler (
JavaUtilLoggingErrorHandler
) should be used.beaconDetectorConfiguration
- configuration for the BeaconDetector
that should be
used or null
to use a configuration with default
settings. If this parameter is null
, the
configuration that is created will use the specified
errorHandler
.resolverConfiguration
- configuration for the ChannelNameResolver
that should
be used or null
to use a configuration with
default settings. If this parameter is null
, the
configuration that is created will use the specified
charset
and errorHandler
.IllegalArgumentException
- if the defaultEventMask
is
ChannelAccessEventMask.DBE_NONE
.public Charset getCharset()
public String getHostName()
public String getUserName()
public int getMaxPayloadReceiveSize()
ChannelAccessConstants.MESSAGE_SIZE_ALIGNMENT
.public int getMaxPayloadSendSize()
ChannelAccessConstants.MESSAGE_SIZE_ALIGNMENT
.public ChannelAccessEventMask getDefaultEventMask()
ChannelAccessMonitor
if no event mask is specified explicitly.public long getCIDBlockReuseTime()
public ErrorHandler getErrorHandler()
public BeaconDetectorConfiguration getBeaconDetectorConfiguration()
BeaconDetector
used by the
client.public ChannelNameResolverConfiguration getResolverConfiguration()
ChannelNameResolver
used by the
client.Copyright © 2014–2017 aquenos GmbH. All rights reserved.