com.adobe.cq.screens.device.DeviceCommand Maven / Gradle / Ivy
/*************************************************************************
*
* ADOBE CONFIDENTIAL
* __________________
*
* Copyright 2017 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
************************************************************************/
package com.adobe.cq.screens.device;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.apache.sling.commons.json.JSONObject;
import aQute.bnd.annotation.ProviderType;
/**
* Screens device command
*/
@ProviderType
public interface DeviceCommand {
/**
* Returns the message of the command.
* @return the command message
*/
@Nonnull
String getCommand();
/**
* Returns the payload of the command or {@code null} if no payload specified.
* @return the payload of the command or {@code null} if no payload
*/
@Nullable
JSONObject getPayload();
/**
* Returns whether the command needs to be acknowledged by the device or not.
* @return true if the command needs to be acknowledged
*/
boolean requiresAck();
/**
* Returns whether the command was acknowledged by the device or not.
* @return true if the command was acknowledged
*/
boolean isAcknowledged();
/**
* Returns whether the command was delivered to the device or not.
* @return true if the command was delivered
*/
boolean isDelivered();
}