Package com.kristensoft.kdc
Class Parameters
- java.lang.Object
-
- com.kristensoft.kdc.Parameters
-
- Direct Known Subclasses:
ClientParameters,ServerParameters
public abstract class Parameters extends Object
Base class for parameters used to configure KDC communication entities. Parameters define common communication settings such as network binding, buffer sizes, serialization, compression, encryption, API registration, latency reporting, and other shared configuration.Parameter instances are created using the builder provided by the protocol-specific parameter class. Global default values may be configured through
Parameters.Defaultsbefore parameter instances are created.- Author:
- Charles B. Kozoyed
- See Also:
ClientParameters,ServerParameters
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParameters.Builder<T extends Parameters.Builder<T>>Base builder for configuring common KDC communication parameters.static classParameters.DefaultsHolds global default values used by KDC parameter builders.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,API>getApiMap()Gets the map of API interfaces to their registered implementations.InetSocketAddressgetBindAddress()Gets the local network address to which the communication entity binds.intgetConnectionQueuePoolSize()Gets the number of worker threads in the connection queue thread pool.com.kristensoft.ko.EncryptionKeygetEncryptionKey()Gets the encryption key used to encrypt and decrypt serialized agent data.longgetLatencyReportingInterval()Gets the interval at which latency metrics are reported.intgetMaxReceiveBufferSize()Gets the maximum size of the receive buffer, in bytes.intgetMaxSendBufferSize()Gets the maximum size of the send buffer, in bytes.StringgetProtocol()Gets the communication protocol associated with these parameters.intgetProtocolVersion()Gets the KDC wire protocol version used for communication.com.kristensoft.ko.KristenObjectsSerializer.SerializationFormatgetSerializationFormat()Gets the serialization format used to serialize agent data.List<String>getWhiteList()Gets the list of classes permitted for deserialization.booleanisAutoStart()Determines whether the communication entity is configured to start automatically.booleanisCompressed()Determines whether compression is enabled for serialized agent data.booleanisCrc()Determines whether CRC integrity checking is enabled for serialized agent data.booleanisLatencyModeOn()Determines whether latency metrics collection is enabled.
-
-
-
Method Detail
-
getProtocol
public String getProtocol()
Gets the communication protocol associated with these parameters.- Returns:
- the protocol name.
-
isAutoStart
public boolean isAutoStart()
Determines whether the communication entity is configured to start automatically.- Returns:
trueif automatic startup is enabled;falseotherwise.
-
getBindAddress
public InetSocketAddress getBindAddress()
Gets the local network address to which the communication entity binds.- Returns:
- the local bind address.
-
getMaxReceiveBufferSize
public int getMaxReceiveBufferSize()
Gets the maximum size of the receive buffer, in bytes.- Returns:
- the maximum receive buffer size, in bytes.
-
getMaxSendBufferSize
public int getMaxSendBufferSize()
Gets the maximum size of the send buffer, in bytes.- Returns:
- the maximum send buffer size, in bytes.
-
isCrc
public boolean isCrc()
Determines whether CRC integrity checking is enabled for serialized agent data.- Returns:
trueif CRC integrity checking is enabled;falseotherwise.
-
isCompressed
public boolean isCompressed()
Determines whether compression is enabled for serialized agent data.- Returns:
trueif compression is enabled;falseotherwise.
-
getEncryptionKey
public com.kristensoft.ko.EncryptionKey getEncryptionKey()
Gets the encryption key used to encrypt and decrypt serialized agent data.- Returns:
- the encryption key, or
nullif encryption is disabled.
-
getWhiteList
public List<String> getWhiteList()
Gets the list of classes permitted for deserialization.- Returns:
- the deserialization class whitelist.
-
getApiMap
public Map<String,API> getApiMap()
Gets the map of API interfaces to their registered implementations.- Returns:
- the registered API map.
-
getProtocolVersion
public int getProtocolVersion()
Gets the KDC wire protocol version used for communication.- Returns:
- the protocol version.
-
getConnectionQueuePoolSize
public int getConnectionQueuePoolSize()
Gets the number of worker threads in the connection queue thread pool.- Returns:
- the connection queue thread pool size.
-
isLatencyModeOn
public boolean isLatencyModeOn()
Determines whether latency metrics collection is enabled.- Returns:
trueif latency metrics collection is enabled;falseotherwise.
-
getLatencyReportingInterval
public long getLatencyReportingInterval()
Gets the interval at which latency metrics are reported.- Returns:
- the latency reporting interval, in milliseconds.
-
getSerializationFormat
public com.kristensoft.ko.KristenObjectsSerializer.SerializationFormat getSerializationFormat()
Gets the serialization format used to serialize agent data.- Returns:
- the serialization format.
-
-