cafe.fingerprintauthentication
Class FingerprintAuthentication

java.lang.Object
  extended by cafe.fingerprintauthentication.FingerprintAuthentication
All Implemented Interfaces:
Fingerprint, FingerprintData, com.griaule.grfingerjava.IStatusEventListener

public class FingerprintAuthentication
extends java.lang.Object
implements FingerprintData, Fingerprint, com.griaule.grfingerjava.IStatusEventListener

This is the main class of FingerprintAutherntication component. It implements following interfaces FingerprintData, Fingerprint and , IStatusEventListener This class makes most of the work in the component. It's also the one which is used when creating the component. Main purpose of the class is to authenticate user fingerprints after authenticating fingerprint it will call FingerprintEvent interface to notify main program about found fingerprint.

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. Parts made by others Copyright(C) University of Helsinki Following notice currently only concerns parts written by Veli-Pekka Kestilä. Lisence of parts made by others is not know in the time of this writing. 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
FingerprintAuthentication(FingerprintSettings settings, FingerprintEvent eventinterface)
          This is the constructor for the FingerprintAuthentication component and class.
 
Method Summary
 void addFingerprint(FPData data)
          This method adds one fingerprint in the fingerprint cache.
 boolean deleteFingerprint(int id)
          This method deletes one fingerprint from the fingerprint cache.
 void finalize()
          This method will do some cleanup for the reader.
 void newFingerprint(com.griaule.grfingerjava.FingerprintImage image)
          This method if called when ReaderListener recives new image it's the heart of the fingerprint authentication part.
 void onSensorPlug(java.lang.String info)
          Following method is called when ever there is fingerprint sensor plugged in.
 void onSensorUnplug(java.lang.String info)
          This method is called when user disconnects fingerprint reader from system.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FingerprintAuthentication

public FingerprintAuthentication(FingerprintSettings settings,
                                 FingerprintEvent eventinterface)
This is the constructor for the FingerprintAuthentication component and class. It initializes fingerprint authentication and creates cache-object which will hold fingerprints which we will authenticate against.

Parameters:
settings -
eventinterface -
Method Detail

onSensorPlug

public void onSensorPlug(java.lang.String info)
Following method is called when ever there is fingerprint sensor plugged in. It's function is to initialize new ReaderListener to recive fingerprint images.

Specified by:
onSensorPlug in interface com.griaule.grfingerjava.IStatusEventListener
Parameters:
info - Identification string of the reader. Valid value is a valid sensor name as a String. Will throw NullPointerException if given a null value.

onSensorUnplug

public void onSensorUnplug(java.lang.String info)
This method is called when user disconnects fingerprint reader from system. It will stop capture on reader and mark old ReaderListener object

Specified by:
onSensorUnplug in interface com.griaule.grfingerjava.IStatusEventListener
Parameters:
info - Indentification string of the reader Valid value is a valid sensor name as a String. Will throw NullPointerException if given a null value.

newFingerprint

public void newFingerprint(com.griaule.grfingerjava.FingerprintImage image)
This method if called when ReaderListener recives new image it's the heart of the fingerprint authentication part. After reciving image we will extract the identification Template for it. After reciving Template we will input it in MatchingContext for identification. When MatchingContext is ready we will one after another input known fingerprints on it to match them against it. Until match is either found or we have exausted our library of fingerprints. After matching has finished we will call authenticatedFingerprint or unAuthenticatedFingerprint methods respectively.

Specified by:
newFingerprint in interface FingerprintData
Parameters:
image - Scanned image of fingerprint.

deleteFingerprint

public boolean deleteFingerprint(int id)
This method deletes one fingerprint from the fingerprint cache.

Specified by:
deleteFingerprint in interface Fingerprint
Parameters:
id - Id of the fingerprint we want to delete. Valid values are from 0 to Integer.MAX_VALUE

addFingerprint

public void addFingerprint(FPData data)
This method adds one fingerprint in the fingerprint cache.

Specified by:
addFingerprint in interface Fingerprint
Parameters:
data - Information of the fingerprint. Valid value is FPData-object with valid info in it. Will throw NullPointerException if you try to feed it null.

finalize

public void finalize()
This method will do some cleanup for the reader.

Overrides:
finalize in class java.lang.Object