C# Class Cet.NATS.Client.ConnectionFactory

Provides factory methods to create connections to NATS Servers.
Show file Open project: highfield/Cet.NATS.Client

Public Methods

Method Description
ConnectionFactory ( ) : System

Creates a new instance of ConnectionFactory using an instance of ClientOptions with its default parameters.

ConnectionFactory ( Cet.NATS.Client.ClientOptions options ) : System

Creates an instance of ConnectionFactory using the provided ClientOptions as parameters.

CreateConnection ( ) : IConnection

Create a connection to the NATs server using the ConnectionFactory options.

This method returns immediately, before the actual connection setup and the successful completion of the handshake

CreateConnection ( Cet.NATS.Client.ClientOptions options ) : IConnection

Create a connection to a NATS Server defined by the given options.

This method returns immediately, before the actual connection setup and the successful completion of the handshake

CreateConnectionAsync ( CancellationToken token ) : Task

Create a connection to the NATs server using the ConnectionFactory options.

This method returns only after the actual connection setup and the successful completion of the handshake.

CreateConnectionAsync ( Cet.NATS.Client.ClientOptions options, CancellationToken token ) : Task

Create a connection to a NATS Server defined by the given options.

This method returns only after the actual connection setup and the successful completion of the handshake.

Method Details

ConnectionFactory() public method

Creates a new instance of ConnectionFactory using an instance of ClientOptions with its default parameters.
public ConnectionFactory ( ) : System
return System

ConnectionFactory() public method

Creates an instance of ConnectionFactory using the provided ClientOptions as parameters.
public ConnectionFactory ( Cet.NATS.Client.ClientOptions options ) : System
options Cet.NATS.Client.ClientOptions
return System

CreateConnection() public method

Create a connection to the NATs server using the ConnectionFactory options.
This method returns immediately, before the actual connection setup and the successful completion of the handshake
No connection to a NATS Server could be established. A timeout occurred connecting to a NATS Server. /// -or- /// An exception was encountered while connecting to a NATS Server. See for more /// details.
public CreateConnection ( ) : IConnection
return IConnection

CreateConnection() public method

Create a connection to a NATS Server defined by the given options.
This method returns immediately, before the actual connection setup and the successful completion of the handshake
No connection to a NATS Server could be established. A timeout occurred connecting to a NATS Server. /// -or- /// An exception was encountered while connecting to a NATS Server. See for more /// details.
public CreateConnection ( Cet.NATS.Client.ClientOptions options ) : IConnection
options Cet.NATS.Client.ClientOptions A instance with the proper parameters.
return IConnection

CreateConnectionAsync() public method

Create a connection to the NATs server using the ConnectionFactory options.
This method returns only after the actual connection setup and the successful completion of the handshake.
No connection to a NATS Server could be established. A timeout occurred connecting to a NATS Server. /// -or- /// An exception was encountered while connecting to a NATS Server. See for more /// details.
public CreateConnectionAsync ( CancellationToken token ) : Task
token CancellationToken Propagates notification that operations should be canceled.
return Task

CreateConnectionAsync() public method

Create a connection to a NATS Server defined by the given options.
This method returns only after the actual connection setup and the successful completion of the handshake.
No connection to a NATS Server could be established. A timeout occurred connecting to a NATS Server. /// -or- /// An exception was encountered while connecting to a NATS Server. See for more /// details.
public CreateConnectionAsync ( Cet.NATS.Client.ClientOptions options, CancellationToken token ) : Task
options Cet.NATS.Client.ClientOptions A instance with the proper parameters.
token CancellationToken Propagates notification that operations should be canceled.
return Task