public abstract class AbstractEventHandler extends java.lang.Object implements AccessControlEventHandler, AccessModuleEventHandler, AlertEventHandler, BasicEventHandler, DoorEventHandler, LedEventHandler, ScanEventHandler, TemperatureEventHandler, ScaleEventHandler
Abstract class which implements all event handlers. Provide a convenient way to handle few events of different interfaces by creating an anonymous class.
     Example:
     
          
         Device remoteDev = new TcpDevice("192.168.1.10");
         
         remoteDev.addListener(new AbstractEventHandler()
         {
              // from ScanEventHandler    
              @Override
              public void scanCompleted()
              {
                  // ask to light all the tags detected during the last scan
                  remoteDev.startLightingTagsLed(_currentDevice.getLastInventory().getTagsAll());
              }
              // from LedEventHandler
              @Override
              public void lightingStarted(List missingTags)
              {
                  System.out.println("Lighting started!");
                  
                  // print the UID of tags which could not be lighted 
                  for(String uid : missingTags)
                  {
                      System.out.println("- "+ uid);
                  }
              }
          }); 
          
     
 
 
 NB: Some of the most famous IDE's (like Intellij IDEA or Eclipse) automatically asks for the methods to override when creating an anonymous class.
| Constructor and Description | 
|---|
| AbstractEventHandler() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | alertRaised(Alert alert,
           java.lang.String extraData) | 
| void | authenticationFailure(AuthenticationModule authModule,
                     User user)Called when a user has failed authenticating himself (insufficient permissions). | 
| void | authenticationSuccess(AuthenticationModule authModule,
                     User user)Called when a user has been successfully authenticated. | 
| void | badgeReaderConnected(boolean isMaster)A badge reader has been successfully initialized. | 
| void | badgeReaderDisconnected(boolean isMaster)A badge reader has been disconnected (serial port connection lost). | 
| void | badgeScanned(java.lang.String badgeNumber)A badge has been scanned. | 
| void | deviceDisconnected()Called when the device has lost the connection to its RFID board. | 
| void | deviceStatusChanged(DeviceStatus status)Called when the device status has changed (see  DeviceStatus). | 
| void | doorClosed()Called when a door has been closed. | 
| void | doorOpenDelay()Called when a door has been open for too long. | 
| void | doorOpened()Called when a door has been open. | 
| void | fingerprintEnrollmentSample(byte sampleNumber)A new fingerprint sample has bene obtained during an Enrollment process. | 
| void | fingerTouched(boolean isMaster)A fingerprint reader has been touched. | 
| void | lightingStarted(java.util.List<java.lang.String> tagsLeft)Called when the tags-lighting process has started. | 
| void | lightingStopped()The tags-lighting process has stopped. | 
| void | scanCancelledByDoor()Called when a scan has been cancelled by a door opening. | 
| void | scanCancelledByHost()Called when a scan has been cancelled by user. | 
| void | scanCompleted()Called when a scan is completed. | 
| void | scanFailed()Called when a scan failed. | 
| void | scanStarted()Called when a scan just starts. | 
| void | tagAdded(java.lang.String tagUid)Called when a tag is detected (during a scan process). | 
| void | temperatureMeasure(double value)Called when a new temperature measurement has been made. | 
| void | weightMeasure(ScaleMeasure measure)Called when a new weight measure has been sent by the scale. | 
public void scanStarted()
ScanEventHandlerscanStarted in interface ScanEventHandlerpublic void scanCompleted()
ScanEventHandlerscanCompleted in interface ScanEventHandlerpublic void tagAdded(java.lang.String tagUid)
ScanEventHandlertagAdded in interface ScanEventHandlertagUid - Tag unique identifier.public void scanFailed()
ScanEventHandlerscanFailed in interface ScanEventHandlerpublic void scanCancelledByHost()
ScanEventHandlerscanCancelledByHost in interface ScanEventHandlerpublic void authenticationSuccess(AuthenticationModule authModule, User user)
AccessControlEventHandlerauthenticationSuccess in interface AccessControlEventHandlerauthModule - Instance of AuthenticationModule allowing the access.user - User instance.public void authenticationFailure(AuthenticationModule authModule, User user)
AccessControlEventHandlerauthenticationFailure in interface AccessControlEventHandlerauthModule - Instance of AuthenticationModule denying the access.user - User instance.public void badgeReaderConnected(boolean isMaster)
AccessModuleEventHandlerbadgeReaderConnected in interface AccessModuleEventHandlerisMaster - If true, event comes from Master badge reader. Otherwise, from the slave.public void badgeReaderDisconnected(boolean isMaster)
AccessModuleEventHandlerbadgeReaderDisconnected in interface AccessModuleEventHandlerisMaster - If true, event comes from Master badge reader. Otherwise, from the slave.public void badgeScanned(java.lang.String badgeNumber)
AccessModuleEventHandlerbadgeScanned in interface AccessModuleEventHandlerbadgeNumber - Unique identifier of the badge scanned.public void fingerTouched(boolean isMaster)
AccessModuleEventHandlerfingerTouched in interface AccessModuleEventHandlerisMaster - If true, event comes from Master fingerprint reader. Otherwise, from the slave.public void fingerprintEnrollmentSample(byte sampleNumber)
AccessModuleEventHandlerfingerprintEnrollmentSample in interface AccessModuleEventHandlerpublic void alertRaised(Alert alert, java.lang.String extraData)
alertRaised in interface AlertEventHandlerpublic void deviceDisconnected()
BasicEventHandlerdeviceDisconnected in interface BasicEventHandlerpublic void deviceStatusChanged(DeviceStatus status)
BasicEventHandlerDeviceStatus).deviceStatusChanged in interface BasicEventHandlerstatus - New status.public void scanCancelledByDoor()
DoorEventHandlerscanCancelledByDoor in interface DoorEventHandlerpublic void doorOpened()
DoorEventHandlerdoorOpened in interface DoorEventHandlerpublic void doorClosed()
DoorEventHandlerdoorClosed in interface DoorEventHandlerpublic void doorOpenDelay()
DoorEventHandlerdoorOpenDelay in interface DoorEventHandlerpublic void lightingStarted(java.util.List<java.lang.String> tagsLeft)
LedEventHandlerlightingStarted in interface LedEventHandlertagsLeft - UID's of tags which could not be lighted.public void lightingStopped()
LedEventHandlerlightingStopped in interface LedEventHandlerpublic void temperatureMeasure(double value)
TemperatureEventHandlertemperatureMeasure in interface TemperatureEventHandlerpublic void weightMeasure(ScaleMeasure measure)
ScaleEventHandlerweightMeasure in interface ScaleEventHandler