Package org.eclipse.keyple.plugin.stub
Class StubSmartCard.Builder
- java.lang.Object
-
- org.eclipse.keyple.plugin.stub.StubSmartCard.Builder
-
- All Implemented Interfaces:
StubSmartCard.CommandStep,StubSmartCard.PowerOnDataStep,StubSmartCard.ProtocolStep
- Enclosing class:
- StubSmartCard
public static class StubSmartCard.Builder extends java.lang.Object implements StubSmartCard.PowerOnDataStep, StubSmartCard.ProtocolStep, StubSmartCard.CommandStep
Builder class forStubSmartCard.- Since:
- 2.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StubSmartCardbuild()Build theStubSmartCardStubSmartCard.ProtocolStepwithPowerOnData(byte[] powerOnData)Define simulated power-on data for theStubSmartCardto buildStubSmartCard.BuilderwithProtocol(java.lang.String protocol)Define simulated protocol for theStubSmartCardto buildStubSmartCard.BuilderwithSimulatedCommand(java.lang.String command, java.lang.String response)Add simulated command/response to theStubSmartCardto build.
-
-
-
Method Detail
-
withSimulatedCommand
public StubSmartCard.Builder withSimulatedCommand(java.lang.String command, java.lang.String response)
Add simulated command/response to theStubSmartCardto build. Command and response should be hexadecimal.- Specified by:
withSimulatedCommandin interfaceStubSmartCard.CommandStep- Parameters:
command- hexadecimal command to respond to (can be a regexp to match multiple apdu)response- hexadecimal response- Returns:
- next step of builder
- Since:
- 2.0.0
-
build
public StubSmartCard build()
Build theStubSmartCard- Specified by:
buildin interfaceStubSmartCard.CommandStep- Returns:
- new instance a StubSmartCard
- Since:
- 2.0.0
-
withPowerOnData
public StubSmartCard.ProtocolStep withPowerOnData(byte[] powerOnData)
Define simulated power-on data for theStubSmartCardto build- Specified by:
withPowerOnDatain interfaceStubSmartCard.PowerOnDataStep- Parameters:
powerOnData- (not nullable) byte of array- Returns:
- next step of builder
- Since:
- 2.0.0
-
withProtocol
public StubSmartCard.Builder withProtocol(java.lang.String protocol)
Define simulated protocol for theStubSmartCardto build- Specified by:
withProtocolin interfaceStubSmartCard.ProtocolStep- Parameters:
protocol- (not nullable) protocol name- Returns:
- next step of builder
- Since:
- 2.0.0
-
-