cafe.fingerprintauthentication
Class ReaderListener

java.lang.Object
  extended by cafe.fingerprintauthentication.ReaderListener
All Implemented Interfaces:
com.griaule.grfingerjava.IFingerEventListener, com.griaule.grfingerjava.IImageEventListener

public class ReaderListener
extends java.lang.Object
implements com.griaule.grfingerjava.IImageEventListener, com.griaule.grfingerjava.IFingerEventListener

Purpose of this class is to listen IImageEventListener and when new image is aquired to forward it to rest of the program.

Since:
1.0 Parts made by Veli-Pekka Kestilä(vpk) Copyright(C) Veli-Pekka Kestilä And are lisenced under LGPL accordin the agreement between copyright holder and Unversity of Helsinki. Following notice currently only concerns parts written by Veli-Pekka Kestilä. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Version:
1.0
Author:
vpk

Constructor Summary
ReaderListener(FingerprintData imagelistener, java.lang.String readername)
          Creates a new ReaderListener object which has FingerprintData-interface implementin object and name of the reader we are listening as a parameter.
 
Method Summary
 java.lang.String getReaderName()
          Returns name of the reader for asking process.
 void onFingerDown(java.lang.String arg0)
          Method from Griaule's interface we don't need.
 void onFingerUp(java.lang.String arg0)
          Method from Griaule's interface we don't need.
 void onImageAcquired(java.lang.String arg0, com.griaule.grfingerjava.FingerprintImage arg1)
          This methond is called when fingerprint reader has aquired a fingerpint.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReaderListener

public ReaderListener(FingerprintData imagelistener,
                      java.lang.String readername)
Creates a new ReaderListener object which has FingerprintData-interface implementin object and name of the reader we are listening as a parameter.

Parameters:
imagelistener - Non null object implementing FingerprintData-interface.
readername - Non null and non empty String-object. Containing the name of the fingerprint reader.
Method Detail

onImageAcquired

public void onImageAcquired(java.lang.String arg0,
                            com.griaule.grfingerjava.FingerprintImage arg1)
This methond is called when fingerprint reader has aquired a fingerpint. Then it's send trough FingerprintData-interface for identification.

Specified by:
onImageAcquired in interface com.griaule.grfingerjava.IImageEventListener
Parameters:
arg0 - Name of the reader as a valid non empty String-object.
arg1 - Fingeprint image as a non null FingerprintImage-object.

onFingerDown

public void onFingerDown(java.lang.String arg0)
Method from Griaule's interface we don't need. Does nothing. But need's to be implemented for interface. Is called when user presses finger to fingerprint reader.

Specified by:
onFingerDown in interface com.griaule.grfingerjava.IFingerEventListener
Parameters:
arg0 - Non null and non empty String-object containing the reader name (id).

onFingerUp

public void onFingerUp(java.lang.String arg0)
Method from Griaule's interface we don't need. Does nothing. But need's to be implemented for interface. Is called when user lifts finger from fingerprint reader.

Specified by:
onFingerUp in interface com.griaule.grfingerjava.IFingerEventListener
Parameters:
arg0 - Non null and non empty String-object containing the reader name (id).

getReaderName

public java.lang.String getReaderName()
Returns name of the reader for asking process.

Returns:
Name of the reader which we a listening. As non null non empty string.