public class AmqpTcpEndpoint

Summary

Represents a TCP-addressable AMQP peer, including the protocol variant to use, and 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 for the IProtocol to be used.

public IProtocol Protocol (rw)

Retrieve or set the 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()

Construct an AmqpTcpEndpoint with a hostname of "localhost", using the IProtocol from Protocols.FromEnvironment(), and the default port number of that IProtocol.

public AmqpTcpEndpoint(string hostName)

Construct an AmqpTcpEndpoint with the given hostname, using the IProtocol from Protocols.FromEnvironment(), and the default port number of that IProtocol.

public AmqpTcpEndpoint(IProtocol protocol, Uri uri, SslOption ssl)

Construct an AmqpTcpEndpoint with the given IProtocol, Uri and ssl options.

public AmqpTcpEndpoint(Uri uri)

Construct an AmqpTcpEndpoint with the given Uri, using the IProtocol from Protocols.FromEnvironment().

public AmqpTcpEndpoint(IProtocol protocol, Uri uri)

Construct an AmqpTcpEndpoint with the given IProtocol and Uri.

public AmqpTcpEndpoint(IProtocol protocol, string hostName, int portOrMinusOne)

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

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

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

public AmqpTcpEndpoint(IProtocol protocol, string hostName)

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

public AmqpTcpEndpoint(string hostName, int portOrMinusOne)

Construct an AmqpTcpEndpoint with the given hostname and port number, using the IProtocol from Protocols.FromEnvironment(). If the port number is -1, the default port number for the IProtocol will be used.

public AmqpTcpEndpoint(IProtocol protocol)

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

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(IProtocol protocol, string address)

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

public static AmqpTcpEndpoint[] ParseMultiple(IProtocol protocol, 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 for the IProtocol to be used.

public IProtocol Protocol (rw)

Summary

Retrieve or set the 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()

Summary

Construct an AmqpTcpEndpoint with a hostname of "localhost", using the IProtocol from Protocols.FromEnvironment(), and the default port number of that IProtocol.

AmqpTcpEndpoint

public AmqpTcpEndpoint(string hostName)

Parameters
Name Type
hostName string

Summary

Construct an AmqpTcpEndpoint with the given hostname, using the IProtocol from Protocols.FromEnvironment(), and the default port number of that IProtocol.

AmqpTcpEndpoint

public AmqpTcpEndpoint(IProtocol protocol, Uri uri, SslOption ssl)

Parameters
Name Type
protocol IProtocol
uri Uri
ssl SslOption

Summary

Construct an AmqpTcpEndpoint with the given IProtocol, 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, using the IProtocol from Protocols.FromEnvironment().

Remarks

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

AmqpTcpEndpoint

public AmqpTcpEndpoint(IProtocol protocol, Uri uri)

Parameters
Name Type
protocol IProtocol
uri Uri

Summary

Construct an AmqpTcpEndpoint with the given IProtocol and Uri.

Remarks

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

AmqpTcpEndpoint

public AmqpTcpEndpoint(IProtocol protocol, string hostName, int portOrMinusOne)

Parameters
Name Type
protocol IProtocol
hostName string
portOrMinusOne int

Summary

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

AmqpTcpEndpoint

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

Parameters
Name Type
protocol IProtocol
hostName string
portOrMinusOne int
ssl SslOption

Summary

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

AmqpTcpEndpoint

public AmqpTcpEndpoint(IProtocol protocol, string hostName)

Parameters
Name Type
protocol IProtocol
hostName string

Summary

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

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, using the IProtocol from Protocols.FromEnvironment(). If the port number is -1, the default port number for the IProtocol will be used.

AmqpTcpEndpoint

public AmqpTcpEndpoint(IProtocol protocol)

Parameters
Name Type
protocol IProtocol

Summary

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

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(IProtocol protocol, string address)

Flags public static
Return type AmqpTcpEndpoint
Parameters
Name Type
protocol IProtocol
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).

ParseMultiple

public static AmqpTcpEndpoint[] ParseMultiple(IProtocol protocol, string addresses)

Flags public static
Return type AmqpTcpEndpoint[]
Parameters
Name Type
protocol IProtocol
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.