C# Class Helios.Topology.NodeBuilder

Static builder class for creating INode instances
Show file Open project: helios-io/helios Class Usage Examples

Public Methods

Method Description
BuildNode ( ) : INode

Creates a new INode instance

FromEndpoint ( IPEndPoint endPoint ) : INode

Creates an INode instance from an IP endpoint

Host ( this n, IPAddress host ) : INode

Add a host to an INode instance

Host ( this n, string host ) : INode

Add a host to an INode instance

MachineName ( this n, string machineName ) : INode

Add a machine name to an INode instance

OperatingSystem ( this n, string osName ) : INode

Add an OS name and version to an INode instance

WithCustomData ( this n, string customData ) : INode

Add a JSON blob to a node's metadata

WithPort ( this n, int portNum ) : INode

Adds a capability to a given INode instance

WithTransportType ( this n, TransportType transportType ) : INode

Adds a capability to a given INode instance

WithVersion ( this n, string serviceVersion ) : INode

Add the version # of the service being used to an INode instance

Method Details

BuildNode() public static method

Creates a new INode instance
public static BuildNode ( ) : INode
return INode

FromEndpoint() public static method

Creates an INode instance from an IP endpoint
public static FromEndpoint ( IPEndPoint endPoint ) : INode
endPoint System.Net.IPEndPoint A System.NET.IPEndpoint argument, usually from an incoming socket connection
return INode

Host() public static method

Add a host to an INode instance
public static Host ( this n, IPAddress host ) : INode
n this A valid INode instance
host System.Net.IPAddress A System.Net IpAddress object representing a valid host for a given service
return INode

Host() public static method

Add a host to an INode instance
public static Host ( this n, string host ) : INode
n this A valid INode instance
host string A string representation of an IP address
return INode

MachineName() public static method

Add a machine name to an INode instance
public static MachineName ( this n, string machineName ) : INode
n this A valid INode instance
machineName string the name of this machine
return INode

OperatingSystem() public static method

Add an OS name and version to an INode instance
public static OperatingSystem ( this n, string osName ) : INode
n this A valid INode instance
osName string The name and version of the host operating system
return INode

WithCustomData() public static method

Add a JSON blob to a node's metadata
public static WithCustomData ( this n, string customData ) : INode
n this A valid INode instance
customData string A JSON-string representing a blob of custom data about this node
return INode

WithPort() public static method

Adds a capability to a given INode instance
public static WithPort ( this n, int portNum ) : INode
n this A valid INode instance
portNum int the port number for this node
return INode

WithTransportType() public static method

Adds a capability to a given INode instance
public static WithTransportType ( this n, TransportType transportType ) : INode
n this A valid INode instance
transportType TransportType the type of network connection used by this node
return INode

WithVersion() public static method

Add the version # of the service being used to an INode instance
public static WithVersion ( this n, string serviceVersion ) : INode
n this A valid INode instance
serviceVersion string The version # of the service this node belongs to
return INode