Previous Topic

Next Topic

Book Contents

Book Index

ProtocolAdapterInfoExt

The ProtocolAdapterInfoExt – com.prosyst.mbs.services.hdm.ProtocolAdapterInfoExt, provides information about supported protocol adapter operation arguments and restrictions. Every protocol adapter has to provide ProtocolAdapterInfo. If the protocol adapter supports the operation for cancel removing the device, this interface will provide this functionality. There is a defined constant – ProtocolAdapterInfoExt.OPERATION_CANCEL_REMOVE, which is used to cancel removing the device.

Also, a method of getOperationInfo(int) exists, which returns protocol operation information – com.prosyst.mbs.services.hdm.OperationInfo. The OperationInfo provides detailed information for the specific protocol adapter operation.

The OperationInfo provides information about:

Types of Remove Arguments

Argument

Description

OperationInfo.ARGUMENT_REMOVE_FORCE

This remove argument is used when the device should be removed immediately. The protocol adapter does not put the device in the removing state. It does not matter if the device is connected or not.

OperationInfo.ARGUMENT_REMOVE_POSTPONE

This remove argument is used when the device should be postpone removed. For example, when the user needs to press a button before removing the device. In this situation the protocol adapter puts the device in HomeDevice.STATUS_REMOVING status and throws NotRemovedException exception to Device Access.

OperationInfo.ARGUMENT_REMOVE_RESET

This remove argument indicates that the device is removed from the device registry and all its data is deleted. It is not used alone, but in combination with the remove arguments described above so that supported remove operation arguments returned from the ProtocolAdapterInfo implementations for a given protocol always match. These combinations are:

  • OperationInfo.ARGUMENT_REMOVE_RESET and OperationInfo.ARGUMENT_REMOVE_FORCE – the Device should be removed immediately and reset afterwards.
  • OperationInfo.ARGUMENT_REMOVE_RESET and OperationInfo.ARGUMENT_REMOVE_POSTPONE – the Device should be postpone-removed and reset afterwards.