public class AmqpTcpEndpoint

Summary

Represents a TCP-addressable AMQP peer, including the protocol variant to use, and a host name and port number.

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.

Constructor Summary

Flags Name Summary
public AmqpTcpEndpoint(IProtocol protocolVariant, 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.

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

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.

Constructor Detail

AmqpTcpEndpoint

public AmqpTcpEndpoint(IProtocol protocolVariant, string hostname, int portOrMinusOne)

Parameters
Name Type
protocolVariant 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.

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.