Example usage for com.amazonaws.services.iot.model DescribeThingRequest DescribeThingRequest

List of usage examples for com.amazonaws.services.iot.model DescribeThingRequest DescribeThingRequest

Introduction

In this page you can find the example usage for com.amazonaws.services.iot.model DescribeThingRequest DescribeThingRequest.

Prototype

DescribeThingRequest

Source Link

Usage

From source file:com.erudika.para.iot.AWSIoTService.java

License:Apache License

@Override
public boolean existsThing(Thing thing) {
    if (thing == null) {
        return false;
    }//from ww  w.  ja v  a  2  s .  c om
    try {
        return getClient()
                .describeThing(new DescribeThingRequest().withThingName(cloudIDForThing(thing))) != null;
    } catch (Exception e) {
        return false;
    }
}