I advice you to use card event and implement CTListener interface.
After being registered, if you wish to detect cards that are already
inserted, call
EventGenerator.getGenerator().createEventsForPresentCards(this) method.
sample:
CardTerminalRegistry ctr = CardTerminalRegistry.getRegistry();
// register the new SmartCard as a Card Terminal Event Listener
ctr.addCTListener(this);
try
{
// Let the registry create events for cards which are
//already present
EventGenerator.getGenerator().createEventsForPresentCards(this);
}
catch(CardTerminalException pException)
{
...
}
Best regards.
Laurent
>-----Original Message-----
>From: Indeeva Maria [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, September 27, 2000 3:32 PM
>To: [EMAIL PROTECTED]
>Subject: [OCF] WaitForCard() method
>
>
>Hello,
>I wonder how to limit the time for the method
>SmartCard.WaitForCard() be
>waiting.
>Because I want user to know that card is not in the terminal
>and not just
>wait. Of course I can add listener and work with event, but in
>this case my
>reader doesn't see the card if it was inserted in advance and I have to
>remove it and insert it again to make it seen.
>I will appreciate any advice in connection with my question.
>Best regards, Maria
>
>
>
>---
>> Visit the OpenCard web site at http://www.opencard.org/ for more
>> information on OpenCard---binaries, source code, documents.
>> This list is being archived at
>http://www.opencard.org/archive/opencard/
>
>! To unsubscribe from the [EMAIL PROTECTED] mailing list
>send an email
>! to
>! [EMAIL PROTECTED]
>! containing the word
>! unsubscribe
>! in the body.
>
>
---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/
! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
! [EMAIL PROTECTED]
! containing the word
! unsubscribe
! in the body.