public class TCPClientSettings extends Object
When constructing the instance with a InetSocketAddress
the IP of the endpoint is cached in this object. This can result to connection problems.
For use cases where this can be a problem we suggest using the constructor that takes the endpoint URI as a string.
Constructor and Description |
---|
TCPClientSettings(InetSocketAddress endpoint,
int tcpTransactionTimeoutSec,
ServiceCredentials serviceCredentials)
Settings for TCP client.
|
TCPClientSettings(InetSocketAddress endpoint,
int tcpTransactionTimeoutSec,
ServiceCredentials serviceCredentials,
PduVersion pduVersion) |
TCPClientSettings(String uri,
int tcpTransactionTimeoutSec,
ServiceCredentials serviceCredentials,
PduVersion pduVersion)
Settings for TCP client.
|
Modifier and Type | Method and Description |
---|---|
InetSocketAddress |
getEndpoint()
Returns either the
InetSocketAddress provided to the constructor or a new instance for every invocation based on the String provided to the constructor. |
PduVersion |
getPduVersion() |
ServiceCredentials |
getServiceCredentials() |
int |
getTcpTransactionTimeoutSec() |
public TCPClientSettings(InetSocketAddress endpoint, int tcpTransactionTimeoutSec, ServiceCredentials serviceCredentials)
endpoint
- TCP gateway endpoint address.serviceCredentials
- credentials for authenticating the client to the TCP gateway.tcpTransactionTimeoutSec
- maximum time in seconds when a TCP transaction should time out from initiating the connection to receiving the whole response.public TCPClientSettings(InetSocketAddress endpoint, int tcpTransactionTimeoutSec, ServiceCredentials serviceCredentials, PduVersion pduVersion)
public TCPClientSettings(String uri, int tcpTransactionTimeoutSec, ServiceCredentials serviceCredentials, PduVersion pduVersion) throws IllegalArgumentException
TCPClientSettings
instance constructs a new InetSocketAddress
for every getEndpoint()
call.uri
- string containing the URI of endpoint. Must be in format: <protocol>://<host>:<port>tcpTransactionTimeoutSec
- maximum time in seconds when a TCP transaction should time out from initiating the connection to receiving the whole response.serviceCredentials
- credentials for authenticating the client to the TCP gateway.pduVersion
- PDU version used for communication.IllegalArgumentException
public InetSocketAddress getEndpoint()
InetSocketAddress
provided to the constructor or a new instance for every invocation based on the String
provided to the constructor.InetSocketAddress
.public int getTcpTransactionTimeoutSec()
public ServiceCredentials getServiceCredentials()
public PduVersion getPduVersion()
Copyright © 2024 Guardtime. All rights reserved.