public class AmqpTcpEndpoint

Summary

Represents a TCP-addressable AMQP peer: a host name and port number.

Para

Some of the constructors take, as a convenience, a System.Uri instance representing an AMQP server address. The use of Uri here is not standardised - Uri is simply a convenient container for internet-address-like components. In particular, the Uri "Scheme" property is ignored: only the "Host" and "Port" properties are extracted.

Field Summary

Flags Type Name Summary
public const int DefaultAmqpSslPort

Indicates that the default port for the protocol should be used

public const int UseDefaultPort

(undocumented)

Property Summary

Flags Type Name Summary
public string HostName (rw)

Retrieve or set the hostname of this AmqpTcpEndpoint.

public int Port (rw)

Retrieve or set the port number of this AmqpTcpEndpoint. A port number of -1 causes the default port number.

public IProtocol Protocol (r)

Retrieve IProtocol of this AmqpTcpEndpoint.

public SslOption Ssl (rw)

Retrieve the SSL options for this AmqpTcpEndpoint. If not set, null is returned

Constructor Summary

Flags Name Summary
public AmqpTcpEndpoint(string hostName, int portOrMinusOne, SslOption ssl)

Construct an AmqpTcpEndpoint with the given hostname, port number and ssl option. If the port number is -1, the default port number will be used.

public AmqpTcpEndpoint(string hostName, int portOrMinusOne)

Construct an AmqpTcpEndpoint with the given hostname, and port number. If the port number is -1, the default port number will be used.

public AmqpTcpEndpoint(string hostName)

Construct an AmqpTcpEndpoint with the given hostname, using the default port.

public AmqpTcpEndpoint()

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

public AmqpTcpEndpoint(Uri uri, SslOption ssl)

Construct an AmqpTcpEndpoint with the given Uri and ssl options.

public AmqpTcpEndpoint(Uri uri)

Construct an AmqpTcpEndpoint with the given Uri.

Method Summary

Flags Name Summary
public virtual bool Equals(object obj)

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

public virtual int GetHashCode()

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

public static AmqpTcpEndpoint Parse(string address)

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

public static AmqpTcpEndpoint[] ParseMultiple(string addresses)

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

public virtual string ToString()

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

Field Detail

public const int DefaultAmqpSslPort

Summary

Indicates that the default port for the protocol should be used

public const int UseDefaultPort

Property Detail

public string HostName (rw)

Summary

Retrieve or set the hostname of this AmqpTcpEndpoint.

public int Port (rw)

Summary

Retrieve or set the port number of this AmqpTcpEndpoint. A port number of -1 causes the default port number.

public IProtocol Protocol (r)

Summary

Retrieve IProtocol of this AmqpTcpEndpoint.

public SslOption Ssl (rw)

Summary

Retrieve the SSL options for this AmqpTcpEndpoint. If not set, null is returned

Constructor Detail

AmqpTcpEndpoint

public AmqpTcpEndpoint(string hostName, int portOrMinusOne, SslOption ssl)

Parameters
Name Type
hostName string
portOrMinusOne int
ssl SslOption

Summary

Construct an AmqpTcpEndpoint with the given hostname, port number and ssl option. If the port number is -1, the default port number will be used.

AmqpTcpEndpoint

public AmqpTcpEndpoint(string hostName, int portOrMinusOne)

Parameters
Name Type
hostName string
portOrMinusOne int

Summary

Construct an AmqpTcpEndpoint with the given hostname, and port number. If the port number is -1, the default port number will be used.

AmqpTcpEndpoint

public AmqpTcpEndpoint(string hostName)

Parameters
Name Type
hostName string

Summary

Construct an AmqpTcpEndpoint with the given hostname, using the default port.

AmqpTcpEndpoint

public AmqpTcpEndpoint()

Summary

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

AmqpTcpEndpoint

public AmqpTcpEndpoint(Uri uri, SslOption ssl)

Parameters
Name Type
uri Uri
ssl SslOption

Summary

Construct an AmqpTcpEndpoint with the given Uri and ssl options.

Remarks

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

AmqpTcpEndpoint

public AmqpTcpEndpoint(Uri uri)

Parameters
Name Type
uri Uri

Summary

Construct an AmqpTcpEndpoint with the given Uri.

Remarks

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

Method Detail

Equals

public virtual bool Equals(object obj)

Flags public virtual
Return type bool
Parameters
Name Type
obj object

Summary

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

GetHashCode

public virtual int GetHashCode()

Flags public virtual
Return type int

Summary

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

Parse

public static AmqpTcpEndpoint Parse(string address)

Flags public static
Return type AmqpTcpEndpoint
Parameters
Name Type
address string

Summary

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

Remarks

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

public static AmqpTcpEndpoint[] ParseMultiple(string addresses)

Flags public static
Return type AmqpTcpEndpoint[]
Parameters
Name Type
addresses string

Summary

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

Remarks

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

ToString

public virtual string ToString()

Flags public virtual
Return type string

Summary

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

Remarks

This method is intended mainly for debugging and logging use.