C# Class RabbitMQ.Client.AmqpTcpEndpoint

Represents a TCP-addressable AMQP peer: a host name and port number.
Afficher le fichier Open project: rabbitmq/rabbitmq-dotnet-client Class Usage Examples

Méthodes publiques

Méthode Description
AmqpTcpEndpoint ( ) : System

Construct an AmqpTcpEndpoint with "localhost" as the hostname, and using the default port.

AmqpTcpEndpoint ( Uri uri ) : System

Creates a new instance of the AmqpTcpEndpoint with the given Uri.

Please see the class overview documentation for information about the Uri format in use.

AmqpTcpEndpoint ( Uri uri, SslOption ssl ) : System

Creates a new instance of the AmqpTcpEndpoint with the given Uri and ssl options.

Please see the class overview documentation for information about the Uri format in use.

AmqpTcpEndpoint ( string hostName, int portOrMinusOne = -1 ) : System

Creates a new instance of the AmqpTcpEndpoint.

AmqpTcpEndpoint ( string hostName, int portOrMinusOne, SslOption ssl ) : System

Creates a new instance of the AmqpTcpEndpoint.

Clone ( ) : object

Clones the endpoint.

CloneWithHostname ( string hostname ) : AmqpTcpEndpoint

Clones the endpoint using the provided hostname.

Equals ( object obj ) : bool

Compares this instance by value (protocol, hostname, port) against another instance.

GetHashCode ( ) : int

Implementation of hash code depending on protocol, hostname and port, to line up with the implementation of Equals.

Parse ( string address ) : AmqpTcpEndpoint

Construct an instance from a protocol and an address in "hostname:port" format.

If the address string passed in contains ":", it is split into a hostname and a port-number part. Otherwise, the entire string is used as the hostname, and the port-number is set to -1 (meaning the default number for the protocol variant specified). Hostnames provided as IPv6 must appear in square brackets ([]).

ParseMultiple ( string addresses ) : AmqpTcpEndpoint[]

Splits the passed-in string on ",", and passes the substrings to Parse.

Accepts a string of the form "hostname:port, hostname:port, ...", where the ":port" pieces are optional, and returns a corresponding array of AmqpTcpEndpoints.

ToString ( ) : string

Returns a URI-like string of the form amqp-PROTOCOL://HOSTNAME:PORTNUMBER.

This method is intended mainly for debugging and logging use.

Method Details

AmqpTcpEndpoint() public méthode

Construct an AmqpTcpEndpoint with "localhost" as the hostname, and using the default port.
public AmqpTcpEndpoint ( ) : System
Résultat System

AmqpTcpEndpoint() public méthode

Creates a new instance of the AmqpTcpEndpoint with the given Uri.
Please see the class overview documentation for information about the Uri format in use.
public AmqpTcpEndpoint ( Uri uri ) : System
uri System.Uri
Résultat System

AmqpTcpEndpoint() public méthode

Creates a new instance of the AmqpTcpEndpoint with the given Uri and ssl options.
Please see the class overview documentation for information about the Uri format in use.
public AmqpTcpEndpoint ( Uri uri, SslOption ssl ) : System
uri System.Uri
ssl SslOption
Résultat System

AmqpTcpEndpoint() public méthode

Creates a new instance of the AmqpTcpEndpoint.
public AmqpTcpEndpoint ( string hostName, int portOrMinusOne = -1 ) : System
hostName string Hostname.
portOrMinusOne int Port number. If the port number is -1, the default port number will be used.
Résultat System

AmqpTcpEndpoint() public méthode

Creates a new instance of the AmqpTcpEndpoint.
public AmqpTcpEndpoint ( string hostName, int portOrMinusOne, SslOption ssl ) : System
hostName string Hostname.
portOrMinusOne int Port number. If the port number is -1, the default port number will be used.
ssl SslOption Ssl option.
Résultat System

Clone() public méthode

Clones the endpoint.
public Clone ( ) : object
Résultat object

CloneWithHostname() public méthode

Clones the endpoint using the provided hostname.
public CloneWithHostname ( string hostname ) : AmqpTcpEndpoint
hostname string Hostname to use
Résultat AmqpTcpEndpoint

Equals() public méthode

Compares this instance by value (protocol, hostname, port) against another instance.
public Equals ( object obj ) : bool
obj object
Résultat bool

GetHashCode() public méthode

Implementation of hash code depending on protocol, hostname and port, to line up with the implementation of Equals.
public GetHashCode ( ) : int
Résultat int

Parse() public static méthode

Construct an instance from a protocol and an address in "hostname:port" format.
If the address string passed in contains ":", it is split into a hostname and a port-number part. Otherwise, the entire string is used as the hostname, and the port-number is set to -1 (meaning the default number for the protocol variant specified). Hostnames provided as IPv6 must appear in square brackets ([]).
public static Parse ( string address ) : AmqpTcpEndpoint
address string
Résultat AmqpTcpEndpoint

ParseMultiple() public static méthode

Splits the passed-in string on ",", and passes the substrings to Parse.
Accepts a string of the form "hostname:port, hostname:port, ...", where the ":port" pieces are optional, and returns a corresponding array of AmqpTcpEndpoints.
public static ParseMultiple ( string addresses ) : AmqpTcpEndpoint[]
addresses string
Résultat AmqpTcpEndpoint[]

ToString() public méthode

Returns a URI-like string of the form amqp-PROTOCOL://HOSTNAME:PORTNUMBER.
This method is intended mainly for debugging and logging use.
public ToString ( ) : string
Résultat string