ProtocolDefinition Class

Represents a custom delivery protocol for an instance of Notification Services.

Espacio de nombres: Microsoft.SqlServer.Management.Nmo
Ensamblado: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Sintaxis

'Declaración
Public NotInheritable Class ProtocolDefinition
    Inherits NamedSmoObject
public sealed class ProtocolDefinition : NamedSmoObject
public ref class ProtocolDefinition sealed : public NamedSmoObject
public final class ProtocolDefinition extends NamedSmoObject
public final class ProtocolDefinition extends NamedSmoObject

Notas

When you configure an instance of Notification Services, you must define any custom delivery protocols used by the instance's applications. You do not need to define the built-in File and Simple Mail Transfer Protocol (SMTP) delivery protocols.

For custom delivery protocols based on the IDeliveryProtocol interface, you need to provide both the fully qualified class name that implements the custom delivery protocol and the name of the assembly that contains the class.

For custom delivery protocols based on the IHttpProtocolProvider interface, just specify HttpExtension for the class name. Do not specify an assembly name. For more information, see Protocol Element (ICF).

Inheritance Hierarchy

System.Object
   Microsoft.SqlServer.Management.Smo.SmoObjectBase
     Microsoft.SqlServer.Management.Smo.SqlSmoObject
       Microsoft.SqlServer.Management.Smo.NamedSmoObject
        Microsoft.SqlServer.Management.Nmo.ProtocolDefinition

Ejemplo

The following examples show how to declare a custom delivery protocol and add it to an instance of Notification Services:

ProtocolDefinition customProtocol = 
    new ProtocolDefinition(myInstance, "MyCustomProtocol");
customProtocol.ClassName = "MyNamespace.MyProtocolClass";
customProtocol.AssemblyName = @"C:\NS\Full\MyCustomComponents.dll";
myInstance.ProtocolDefinitions.Add(customProtocol);
Dim customProtocol As ProtocolDefinition = _
    New ProtocolDefinition(myInstance, "MyCustomProtocol")
customProtocol.ClassName = "MyNamespace.MyProtocolClass"
customProtocol.AssemblyName = _
    "C:\NS\Full\MyCustomComponents.dll"
myInstance.ProtocolDefinitions.Add(customProtocol)

Seguridad para subprocesos

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Plataformas

Plataformas de desarrollo

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Plataformas de destino

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Vea también

Referencia

ProtocolDefinition Members
Microsoft.SqlServer.Management.Nmo Namespace

Otros recursos

Definir protocolos de entrega personalizados
Protocol Element (ICF)