2using System.Threading.Tasks;
26 DateTime TP = DateTime.UtcNow;
30 Recipient = Recipient,
31 RecipientServer = RecipientServer,
34 NextAttempt = TP.AddHours(1),
46 internal static async Task QueueUnprocessedMessages()
52 if (TP <= DateTime.Now)
53 await ResendMessage(Message);
59 private static async Task ResendMessage(
object State)
61 if (!(State is SynchronizationMessage Message))
65 Message.NextAttempt = DateTime.UtcNow.AddHours(Message.NrAttempts);
72 private static async Task
SendMessage(SynchronizationMessage Message)
76 IqResultEventArgs e = await XmppServerModule.Server.IqRequest(
"set", Message.Sender, Message.Recipient,
77 string.Empty, Message.Xml);
83 await XmppServerModule.Server.SendMessage(
string.Empty,
string.Empty, Message.Sender, Message.Recipient,
84 string.Empty, Message.Xml);
Static class managing the application event log. Applications and services log events on this static ...
static void Exception(Exception Exception, string Object, string Actor, string EventId, EventLevel Level, string Facility, string Module, params KeyValuePair< string, object >[] Tags)
Logs an exception. Event type will be determined by the severity of the exception.
Static class managing the runtime environment of the IoT Gateway.
static DateTime ScheduleEvent(ScheduledEventCallback Callback, DateTime When, object State)
Schedules a one-time event.
Event arguments for responses to IQ queries.
bool Ok
If the response is an OK result response (true), or an error response (false).
Represents a case-insensitive string.
Static interface for database persistence. In order to work, a database provider has to be assigned t...
static async Task Update(object Object)
Updates an object in the database.
static async Task Delete(object Object)
Deletes an object in the database.
static Task< IEnumerable< object > > Find(string Collection, params string[] SortOrder)
Finds objects in a given collection.
static async Task Insert(object Object)
Inserts an object into the default collection of the database.
Component that synchronizes content in the federated network, by sending synchronization messages and...
static async Task SendMessage(CaseInsensitiveString Sender, CaseInsensitiveString Recipient, CaseInsensitiveString RecipientServer, string Xml)
Sends a synchronization message
Stores information about a synchronization message that must be delivered to a component on another b...
DateTime NextAttempt
When message can be resent.