O'Reilly logo

Mastering Internet of Things by Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a provisioning client

When we've found a component providing provisioning support, we instantiate a provisioning client, pointing to that component:

private void UseProvisioningServer(string JID, string OwnerJid) 
{ 
   if (this.provisioningClient == null || 
         this.provisioningClient.ProvisioningServerAddress!=JID|| 
         this.provisioningClient.OwnerJid != OwnerJid) 
   { 
         if (this.provisioningClient != null) 
         { 
               this.provisioningClient.Dispose(); 
               this.provisioningClient = null; 
         } 
 
         this.provisioningClient = new ProvisioningClient( 
               this.xmppClient, JID, OwnerJid); 
         this.AttachFeatures(); 
   } 
} 
Now that we have created a provisioning client referencing our XMPP client, we must remove the OnPresenceSubscribe and OnPresenceUnsubscribe event handlers defined ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required