|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.dtt.ca.CAObject
it.dtt.ca.Slot
public abstract class Slot
This class represents the physical slot in which a smart card can be inserted. Access to the slot via the class methods is allowed as long as the current session remains open, i.e. until the application calls it.dtt.ca.CAManagerFactory.closeSession() to close the current session; subsequently, the class methods will throw the it.dtt.ca.exception.SessionClosedException exception. This behaviour is implemented by CAObject from which Slot derives.
Constructor Summary | |
---|---|
protected |
Slot(CAManager manager,
int id)
Create a slot instance. |
Method Summary | |
---|---|
void |
addSlotListener(SlotListener listener)
A SlotListener is notified if the card is inserted or removed
from the slot. |
int |
getSlotId()
Returns the number identifying this slot. |
abstract SmartCard |
getSmartCard()
Get the Smart Card object associated with this card reader. |
abstract int |
getStatus()
Tells if a smart card is inserted in the slot. |
void |
removeSlotListener(SlotListener listener)
Remove a previously added SlotListener . |
Methods inherited from class it.dtt.ca.CAObject |
---|
checkSession, closeSession, getParent, getSession, sessionClosed, sessionClosing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Slot(CAManager manager, int id)
manager
- the CA Manager controlling this slot.id
- the id of this slot.Method Detail |
---|
public int getSlotId() throws SessionClosedException
SessionClosedException
- if the session is closed.public void addSlotListener(SlotListener listener) throws SessionClosedException
SlotListener
is notified if the card is inserted or removed
from the slot.
listener
- object listening to slot changes.
SessionClosedException
- if the session is closed.public void removeSlotListener(SlotListener listener) throws SessionClosedException
SlotListener
.
listener
- object to be removed.
SessionClosedException
- if the session is closed.public abstract int getStatus() throws SessionClosedException
SessionClosedException
- if the session is closed.SlotEvent
public abstract SmartCard getSmartCard() throws CardNotFoundException, AccessDeniedException, SessionClosedException
CardNotFoundException
- if a card is not inserted in the slot
AccessDeniedException
- if the wrong card is inserted in the slot (i.e. a card which do not correspond to the CA kernel in use)
SessionClosedException
- if the session is closed.SmartCard
,
CardNotFoundException
,
AccessDeniedException
,
SessionClosedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |