Class PTEID_ReaderContext


  • public class PTEID_ReaderContext
    extends PTEID_Object
    This class represent a reader.
    You get reader object from the ReaderSet
    either by its index (getReaderByNum) or by its name (getReaderByName).
    Once you have a reader object, you can check if a card is present (isCardPresent).
    Then you can ask which type of card is in the reader with getCardType()
    and then get a card object using one of this method :
    getCard or getEIDCard.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void BeginTransaction()
      Begin a transaction with the reader
      void delete()  
      static void doJavaCallBack​(int iKey, long lRet, long ulState)  
      void EndTransaction()
      End the transaction
      PTEID_Card getCard()
      Get the card in the reader.
      Instantiation is made regarding the type of the card
      (PTEID_EIDCard).

      If no card is present in the reader, exception PTEID_ExNoCardPresent is thrown.
      If the card type is not supported, exception PTEID_ExCardTypeUnknown is thrown.
      PTEID_CardContactInterface getCardContactInterface()
      Get the card interface used on the current used card

      Returns the interface of the current card
      PTEID_CardType getCardType()
      Return the type of the card in the reader.

      Throw PTEID_ExNoCardPresent exception if no card is present.
      PTEID_EIDCard getEIDCard()
      Get the EIDcard in the reader.
      Instantiation is made regarding the type of the card
      (PTEID_EIDCard).

      If no card is present in the reader, exception PTEID_ExNoCardPresent is thrown.
      If the card is not an EIDcard, exception PTEID_ExCardBadType is thrown.
      java.lang.String getName()
      Return the name of the reader.
      boolean isCardChanged​(PTEID_ulwrapper ulOldId)
      Return true if a card has changed since the last called (with the same ulOldId parameter).
      boolean isCardPresent()
      Return true if a card is present and false otherwise.
      boolean isPinpad()  
      void releaseCard()
      Release the card.



      void releaseCard​(boolean bAllReference)
      Release the card.

      long SetEventCallback​(Callback callback, java.lang.Object pvRef)
      Specify a callback function to be called each time a
      card is inserted/remove in/from this reader.

      void StopEventCallback​(long ulHandle)
      To tell that the callbacks are not longer needed.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • doJavaCallBack

        public static void doJavaCallBack​(int iKey,
                                          long lRet,
                                          long ulState)
      • isPinpad

        public boolean isPinpad()
      • releaseCard

        public void releaseCard​(boolean bAllReference)
                         throws PTEID_Exception
        Release the card.

        Parameters:
        bAllReference - If true all the invalid reference/pointer are destroyed.
        bAllReference - PUT THIS PARAMETER TO TRUE IS THREAD UNSAFE.
        bAllReference - You have to be sure that you will not use any old reference/pointer after this release
        Throws:
        PTEID_Exception
      • getCard

        public PTEID_Card getCard()
                           throws PTEID_Exception
        Get the card in the reader.
        Instantiation is made regarding the type of the card
        (PTEID_EIDCard).

        If no card is present in the reader, exception PTEID_ExNoCardPresent is thrown.
        If the card type is not supported, exception PTEID_ExCardTypeUnknown is thrown.
        Throws:
        PTEID_Exception
      • getCardContactInterface

        public PTEID_CardContactInterface getCardContactInterface()
        Get the card interface used on the current used card

        Returns the interface of the current card
      • getEIDCard

        public PTEID_EIDCard getEIDCard()
                                 throws PTEID_Exception
        Get the EIDcard in the reader.
        Instantiation is made regarding the type of the card
        (PTEID_EIDCard).

        If no card is present in the reader, exception PTEID_ExNoCardPresent is thrown.
        If the card is not an EIDcard, exception PTEID_ExCardBadType is thrown.
        Throws:
        PTEID_Exception
      • SetEventCallback

        public long SetEventCallback​(Callback callback,
                                     java.lang.Object pvRef)
                              throws PTEID_Exception
        Specify a callback function to be called each time a
        card is inserted/remove in/from this reader.

        Returns:
        A handle can be used to stop the callbacks when they are no longer needed.
        Throws:
        PTEID_Exception
      • StopEventCallback

        public void StopEventCallback​(long ulHandle)
                               throws PTEID_Exception
        To tell that the callbacks are not longer needed.
        Parameters:
        ulHandle - is the handle return by SetEventCallback
        Throws:
        PTEID_Exception