Partager via


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
System_CAPS_pubproperty IPEndpoint

Gets an IPEndPoint object for the role instance endpoint. The IPEndPoint object provides the IP address and port number for the endpoint.

System_CAPS_pubproperty Protocol

Gets the protocol that is defined for the endpoint.

System_CAPS_pubproperty 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.

System_CAPS_pubproperty RoleInstance

Gets the RoleInstance object that is associated with an endpoint.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod 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