Class Client
Worldline Global Collect platform client. Thread-safe.
This client and all its child clients are bound to one specific value for the X-GCS-ClientMetaInfo header. To get a new client with a different header value, use WithClientMetaInfo(string).
Inherited Members
Namespace: Worldline.Connect.Sdk
Assembly: Worldline.Connect.Sdk.dll
Syntax
public class Client : ApiResource, IDisposable, ILoggingCapable, IObfuscationCapable
Constructors
Client(Communicator)
Declaration
public Client(Communicator communicator)
Parameters
Type | Name | Description |
---|---|---|
Communicator | communicator |
Properties
BodyObfuscator
The current non-null body obfuscator to use.
Declaration
public BodyObfuscator BodyObfuscator { set; }
Property Value
Type | Description |
---|---|
BodyObfuscator |
HeaderObfuscator
The current non-null header obfuscator to use.
Declaration
public HeaderObfuscator HeaderObfuscator { set; }
Property Value
Type | Description |
---|---|
HeaderObfuscator |
V1
Declaration
public V1Client V1 { get; }
Property Value
Type | Description |
---|---|
V1Client |
Methods
CloseExpiredConnections()
Utility method that delegates the call to this client's communicator.
Declaration
public void CloseExpiredConnections()
CloseIdleConnections(TimeSpan)
Utility method that delegates the call to this client's communicator.
Declaration
public void CloseIdleConnections(TimeSpan timespan)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timespan | Idle time. |
DisableLogging()
Turns off logging.
Declaration
public void DisableLogging()
Dispose()
Releases any system resources associated with this object.
Declaration
public void Dispose()
EnableLogging(ICommunicatorLogger)
Turns on logging using the given communicator logger.
Declaration
public void EnableLogging(ICommunicatorLogger communicatorLogger)
Parameters
Type | Name | Description |
---|---|---|
ICommunicatorLogger | communicatorLogger | The given communicator logger. |
Exceptions
Type | Condition |
---|---|
ArgumentException | If the given communicator logger is |
WithClientMetaInfo(string)
Returns a new Client which uses the passed meta data for the X-GCS-ClientMetaInfo header.
Declaration
public Client WithClientMetaInfo(string clientMetaInfo)
Parameters
Type | Name | Description |
---|---|---|
string | clientMetaInfo | JSON string containing the meta data for the client |
Returns
Type | Description |
---|---|
Client |
Exceptions
Type | Condition |
---|---|
MarshallerSyntaxException | if the given clientMetaInfo is not a valid JSON string |