Protocol Element (ADF)
Contains elements that define a delivery protocol used by the notification class to deliver notifications.
语法
<NotificationClasses>
<NotificationClass>
...
<Protocols>
<Protocol>
Element Characteristics
Characteristic | Description |
---|---|
Data type |
None. |
Default value |
None. |
Occurrence |
Required once or more per Protocols element. |
Updates |
Can be added and deleted when updating the application. |
Element Relationships
Relationship | Elements |
---|---|
Parent element |
|
Child elements |
备注
The child elements of the Protocol element define a delivery protocol used by the notification class. Each notification class must define at least one delivery protocol to deliver notifications.
The delivery protocol must be associated with a delivery channel in the instance configuration file (ICF). For more information see 定义传递通道.
示例
The following example shows how to define an SMTP delivery protocol, and provides values for the fields required to create an SMTP message. (Values surrounded by percent characters (%) are parameters defined either in the ParameterDefaults element or when creating the instance of Notification Services.)
If the initial delivery attempt is unsuccessful, notifications sent using this protocol attempt redelivery 15 minutes after the initial attempt, 30 minutes later, and then one hour later.
<Protocol>
<ProtocolName>SMTP</ProtocolName>
<Fields>
<Field>
<FieldName>Subject</FieldName>
<SqlExpression>%SubjectLine%</SqlExpression>
</Field>
<Field>
<FieldName>From</FieldName>
<SqlExpression>%fromAddress%</SqlExpression>
</Field>
<Field>
<FieldName>To</FieldName>
<FieldReference>DeviceAddress</FieldReference>
</Field>
<Field>
<FieldName>Priority</FieldName>
<SqlExpression>%mailPriority%</SqlExpression>
</Field>
<Field>
<FieldName>BodyFormat</FieldName>
<SqlExpression>"html"</SqlExpression>
</Field>
</Fields>
<ProtocolExecutionSettings>
<RetrySchedule>
<RetryDelay>P0DT00H15M00S</RetryDelay>
<RetryDelay>P0DT00H30M00S</RetryDelay>
<RetryDelay>P0DT01H00M00S</RetryDelay>
</RetrySchedule>
</ProtocolExecutionSettings>
</Protocol>
请参阅
参考
Application Definition File Reference