public interface

Cradle

com.datalogic.extension.selfshopping.cradle.Cradle
Known Indirect Subclasses

Class Overview

Interface exposing the API of a generic Cradle.

Summary

Nested Classes
enum Cradle.InsertionState Enumerative representing an insertion state depending on the device's position. 
Public Methods
abstract boolean addCradleInsertionListener(CradleInsertionListener listener)
Add a listener that is used in order to manage the insertion and extraction events from the Cradle.
abstract Cradle.InsertionState getInsertionState()
Returns the current device insertion state.
abstract CradleType getType()
Returns the platform dependent Cradle API type.
abstract boolean isDeviceInCradle()
Checks if the device is inserted in the Cradle.
abstract boolean removeCradleInsertionListener(CradleInsertionListener listener)
Remove a listener previously inserted by the specific add method.

Public Methods

public abstract boolean addCradleInsertionListener (CradleInsertionListener listener)

Added in revision 2

Add a listener that is used in order to manage the insertion and extraction events from the Cradle.

Parameters
listener The CradleInsertionListener to add.
Returns
  • boolean true in case of success, false otherwise.

public abstract Cradle.InsertionState getInsertionState ()

Added in revision 3

Returns the current device insertion state.

Returns

public abstract CradleType getType ()

Added in revision 1

Returns the platform dependent Cradle API type. This method does not refer to the type of Cradle the device is inserted into but only to the different API that can be called from the current device.

Returns
  • A CradleType specifying the current Cradle API type.

public abstract boolean isDeviceInCradle ()

Added in revision 1

Checks if the device is inserted in the Cradle.

Returns
  • boolean true if the device is inside the Cradle, false otherwise or in case of failure in the detection.

public abstract boolean removeCradleInsertionListener (CradleInsertionListener listener)

Added in revision 2

Remove a listener previously inserted by the specific add method.

Parameters
listener The CradleInsertionListener to remove.
Returns
  • boolean true in case of success, false otherwise.