com.microsoft.azure.iothub.transport.amqps.IotHubReactor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iothub-java-device-client Show documentation
Show all versions of iothub-java-device-client Show documentation
The Microsoft Azure IoT Device SDK for Java
/*
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
package com.microsoft.azure.iothub.transport.amqps;
import org.apache.qpid.proton.engine.HandlerException;
import org.apache.qpid.proton.reactor.Reactor;
public class IotHubReactor
{
Reactor reactor;
public IotHubReactor(Reactor reactor)
{
this.reactor = reactor;
}
public void run() throws HandlerException
{
this.reactor.setTimeout(10);
this.reactor.start();
while(this.reactor.process())
{
if(Thread.currentThread().isInterrupted())
{
return;
}
}
this.reactor.stop();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy