RoleInstanceEndpoint Class
Represents an endpoint that is associated with a role instance.
Namespace: Microsoft.WindowsAzure.ServiceRuntime
Assembly: Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)
Inheritance Hierarchy
System.Object
Microsoft.WindowsAzure.ServiceRuntime.RoleInstanceEndpoint
Syntax
public abstract class RoleInstanceEndpoint
public ref class RoleInstanceEndpoint abstract
[<AbstractClass>]
type RoleInstanceEndpoint = class end
Public MustInherit Class RoleInstanceEndpoint
Properties
Name | Description | |
---|---|---|
IPEndpoint | Gets an IPEndPoint object for the role instance endpoint. The IPEndPoint object provides the IP address and port number for the endpoint. |
|
Protocol | Gets the protocol that is defined for the endpoint. |
|
PublicIPEndpoint | Gets an IPEndPoint object for the role instance endpoint. The IPEndPoint object provides the port number for the direct port endpoint. The IP address in the property is unused. |
|
RoleInstance | Gets the RoleInstance object that is associated with an endpoint. |
Methods
Name | Description | |
---|---|---|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Inherited from Object.) |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
MemberwiseClone() | (Inherited from Object.) |
|
ToString() | (Inherited from Object.) |
Remarks
Endpoints are used by role instances to communicate externally (InputEndpoint) with other applications and internally (InternalEndpoint) with other role instances. Endpoints are defined in the service model for the hosted service. For more information about defining endpoints, see Enabling Communication for Role Instances in Windows Azure and Azure Service Definition Schema (.csdef File).
The following code example shows how to retrieve endpoint information from role instances:
foreach (var role in RoleEnvironment.Roles)
{
foreach (var roleInst in role.Value.Instances)
{
foreach (RoleInstanceEndpoint instanceEndpoint in roleInst.InstanceEndpoints.Values)
{
Trace.WriteLine("Instance endpoint IP address and port:" + instanceEndpoint.IPEndpoint, "Information");
}
}
}
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
RoleEnvironment
Microsoft.WindowsAzure.ServiceRuntime Namespace
Return to top