Package org.eclipse.keypop.card
Class AbstractApduException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.eclipse.keypop.card.AbstractApduException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CardBrokenCommunicationException
,ReaderBrokenCommunicationException
,UnexpectedStatusWordException
Generic exception carrying response data received from the card until a communication failure
occurs or an unexpected APDU status word is received.
- Since:
- 1.0.0
- See Also:
-
Constructor Summary
ConstructorDescriptionAbstractApduException
(CardResponseApi cardResponseApi, boolean isCardResponseComplete, String message) Builds a new exception embedding card response data.AbstractApduException
(CardResponseApi cardResponseApi, boolean isCardResponseComplete, String message, Throwable cause) Builds a new exception embedding card response data with the originating exception. -
Method Summary
Modifier and TypeMethodDescriptionGets the response data received so far.boolean
Indicates if all the responses expected from the correspondingCardRequestSpi
have been received.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AbstractApduException
public AbstractApduException(CardResponseApi cardResponseApi, boolean isCardResponseComplete, String message) Builds a new exception embedding card response data.- Parameters:
cardResponseApi
- The card responses received so far.isCardResponseComplete
- True if the number responses equals the number of requests present in the originalCardRequestSpi
.message
- the message to identify the exception context- Since:
- 1.0.0
-
AbstractApduException
public AbstractApduException(CardResponseApi cardResponseApi, boolean isCardResponseComplete, String message, Throwable cause) Builds a new exception embedding card response data with the originating exception.- Parameters:
cardResponseApi
- The card responses received so far.isCardResponseComplete
- True if the number responses equals the number of requests present in the originalCardRequestSpi
.message
- Message to identify the exception context.cause
- The cause- Since:
- 1.0.0
-
-
Method Details
-
getCardResponse
Gets the response data received so far.- Returns:
- A non-null reference.
- Since:
- 1.0.0
-
isCardResponseComplete
public boolean isCardResponseComplete()Indicates if all the responses expected from the correspondingCardRequestSpi
have been received.- Returns:
- True if all expected responses have been received.
- Since:
- 1.0.0
-