|
Java Card v2.2.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Service
This is the base interface for the service framework on the Java Card platform.
A Service is an object that is able to perform partial or complete
processing on a set of incoming commands encapsulated in an APDU.
Services collaborate in pre-processing, command processing and
post-processing of incoming APDU commands. They share the same APDU object
by using the communication framework and the Common Service Format (CSF)
defined in BasicService.
An application is built by combining pre-built and newly defined Services
within a Dispatcher object.
BasicService| Method Summary | |
|---|---|
boolean |
processCommand(APDU apdu)
Processes the command in the APDU object. |
boolean |
processDataIn(APDU apdu)
Pre-processes the input data for the command in the APDU object. |
boolean |
processDataOut(APDU apdu)
Post-processes the output data for the command in the APDU object. |
| Method Detail |
|---|
boolean processDataIn(APDU apdu)
APDU object.
When invoked, the APDU object
should either be in STATE_INITIAL with the APDU buffer in the Init format
or in STATE_FULL_INCOMING with the APDU buffer in the Input Ready format
defined in BasicService.
The method must return true if no more
pre-processing should be performed, and false otherwise.
In particular, it must return false if it has not performed any
processing on the command.
After normal completion, the APDU object is usually in STATE_FULL_INCOMING
with the APDU buffer in the Input Ready format defined in BasicService.
However, in some cases if the Service processes the command entirely,
the APDU object may be in STATE_OUTGOING
with the APDU buffer in the Output Ready format defined in BasicService.
apdu - the APDU object containing the command being processed
true if input processing is finished, false otherwiseboolean processCommand(APDU apdu)
APDU object.
When invoked, the APDU object
should normally be in STATE_INITIAL with the APDU buffer in the Init format
or in STATE_FULL_INCOMING with the APDU buffer in the Input Ready format
defined in BasicService. However, in some cases, if a pre-processing
service has processed the command entirely, the APDU object may be in
STATE_OUTGOING with the APDU buffer in the Output Ready
format defined in BasicService.
The method must return true if no more command
processing is required, and false otherwise.
In particular, it should
return false if it has not performed any processing on the command.
After normal completion, the APDU object must be in
STATE_OUTGOING and the output response must be in the
APDU buffer in the Output Ready format defined in BasicService.
apdu - the APDU object containing the command being processed
true if the command has been processed, false otherwiseboolean processDataOut(APDU apdu)
APDU object.
When invoked, the APDU
object should be in STATE_OUTGOING with the APDU buffer in
the Output Ready format defined in BasicService.
The method should return true if
no more post-processing is required, and false otherwise. In particular,
it should return false if it has not performed any processing on the
command.
After normal completion, the APDU object should must be in
STATE_OUTGOING and the output response must be in the
APDU buffer in the Output Ready format defined in BasicService.
apdu - the APDU object containing the command being processed
true if output processing is finished, false otherwise
|
Java Card v2.2.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||