ProtocolDefinition Class

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

Namespace: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntax

'Declaration
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

Remarks

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

Example

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)

Thread Safety

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.

Platforms

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

See Also

Reference

ProtocolDefinition Members
Microsoft.SqlServer.Management.Nmo Namespace

Other Resources

Defining Custom Delivery Protocols
Protocol Element (ICF)