Interface SuspendMechanism
uicc.suspendresume.SuspendMechanism provides a callback
interface for applets to be notified by the UICC Runtime Environment about
suspension operations. An applet Class (which extends the
javacard.framework.Applet class) must implement this interface
if their instances needs to be involved for suspension and resume
operations.-
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is called by the UICC runtime environment to inform the applet that a resume operation will be done.voidsuspendOperation(byte newMaxTimeUnit, short newMaxTimeValue) This method is called by the UICC runtime environment to inform the applet that a suspend operation has been accepted with a maximum suspension time interval.shortsuspendRequest(byte minTimeUnit, short minTimeValue, byte maxTimeUnit, short maxTimeValue) This method is called by the UICC runtime environment to inform the applet that a suspend operation has been requested with a proposed suspension time interval.
-
Method Details
-
suspendRequest
short suspendRequest(byte minTimeUnit, short minTimeValue, byte maxTimeUnit, short maxTimeValue) This method is called by the UICC runtime environment to inform the applet that a suspend operation has been requested with a proposed suspension time interval.The applet should, within this method, check if the minimum time proposed is acceptable, meaning lower than the maximum suspension time acceptable for the applet. If the minimum time does not exceed the acceptable suspension time for the applet, the applet should return the maximum acceptable suspension time in the proposed range or reject the request.
If the applet returns a higher suspension time than proposed by the terminal, this value will be ignored by the UICC Runtime environment. If the applet returns a value below the proposed minimal, an invalid time unit or raise an exception, the UICC Runtime Environment shall then reject the suspension.This method is executed in the context of the active applet instance as the currently selected applet instance.
Note:
- As the UICC Runtime Environment may reject the suspension, the applet should not perform any action based on the assumption that the supension will succeed.
- If the applet accepts the suspension, it is allowed to use any
time unit constant defined in
SuspendConstantsinterface.
- Parameters:
minTimeUnit- proposed minimum time unit.minTimeValue- proposed minimum time value.maxTimeUnit- proposed maximum time unit.maxTimeValue- proposed maximum time value.- Returns:
SUSPEND_REQUEST_REJECTEDto reject the request or,- Maximum acceptable time to accept the request encoded as:
- In MSB byte: the maximum acceptable time unit selected from the
predefined constants in
interfaceSuspendConstants - In LSB byte: the maximum acceptable time value as un unsigned byte.
- In MSB byte: the maximum acceptable time unit selected from the
predefined constants in
-
suspendOperation
void suspendOperation(byte newMaxTimeUnit, short newMaxTimeValue) This method is called by the UICC runtime environment to inform the applet that a suspend operation has been accepted with a maximum suspension time interval. Applet should, within this method, proceed with all their necessary operation for suspension.This method is executed in the context of the active applet instance as the currently selected applet instance.
Note:
- Exceptions thrown by this method are caught by the UICC runtime environment and ignored.
- The applet should be prepared that a subsequent resume operation may not follow. Instead an invocation in another card session may occur without previous resume operation.
- Parameters:
newMaxTimeUnit- new maximum interval time unit.newMaxTimeValue- new maximum interval time value.
-
resumeIndication
void resumeIndication()This method is called by the UICC runtime environment to inform the applet that a resume operation will be done. The applet should proceed with all its necessary operations for a proper resume process.This method is executed in the context of the active applet instance as the currently selected applet instance.
Note:
- Exceptions thrown by this method are caught by the UICC runtime environment and ignored.
-