C# Class RabbitMQ.Client.AmqpTcpEndpoint

Represents a TCP-addressable AMQP peer: a host name and port number.
显示文件 Open project: rabbitmq/rabbitmq-dotnet-client Class Usage Examples

Public Methods

Method 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 method

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

AmqpTcpEndpoint() public method

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
return System

AmqpTcpEndpoint() public method

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
return System

AmqpTcpEndpoint() public method

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.
return System

AmqpTcpEndpoint() public method

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.
return System

Clone() public method

Clones the endpoint.
public Clone ( ) : object
return object

CloneWithHostname() public method

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

Equals() public method

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

GetHashCode() public method

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

Parse() public static method

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
return AmqpTcpEndpoint

ParseMultiple() public static method

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
return AmqpTcpEndpoint[]

ToString() public method

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
return string