Package ca.mint.mintchip.blackberry.api

The ca.mint.mintchip.blackberry.api package contains classes that implement the MintChip functionality on the BlackBerry platform.

See: Description

Class Summary
Class Description
MessageFactory This class is responsible for instantiating MintChip message types.
MintChipFactory This class is responsible for instantiating a concrete implementation of the IMintChip for the BlackBerry.

Description

The ca.mint.mintchip.blackberry.api package contains classes that implement the MintChip functionality on the BlackBerry platform.

It provides two main public factory classes:

  • MintChipFactory - class responsible for instantiating a concrete implementation of the IMintChip for the BlackBerry.
  • MessageFactory - class responsible for instantiating MintChip message types using the BlackBerry implementation of the IBase64Processor interface.

A typical approach to using the MintChip API in a BlackBerry application involves the following steps:

  • Reference the ca.mint.mintchip.blackberry.api and ca.mint.mintchip.contract Java packages. This can be done by referencing the MintChipBlackBerryApi.jar and MintChipCommon.jar files from a BlackBerry Eclipse project.
  • Import the MintChip API packages into the source code file:
            import ca.mint.mintchip.blackberry.api.*;
            import ca.mint.mintchip.contract.*;
            
  • Create an instance of the class that implements the IMintChip interface, which is the main interface to invoke the MintChip functionality:
    IMintChip mintChip = MintChipFactory.getInstance().createMintChip();
  • Use MessageFactory to instantiate message types:
    IValueRequestMessage request = (IValueRequestMessage) MessageFactory.getInstance().toMessage(base64Request);
  • Call methods of the IMintChip interface and be prepared to handle the MintChipException:
            try {
                IValueMessage valueMessage = mintChip.createValueMessage(request);
            } 
            catch (MintChipException e) {
                // TODO Handle the exception
            }
            
  • Deploy the following COD files to the BlackBerry device when deploying your application:
    • MintChipBlackBerryApi.cod
    • MintChipCommon.cod
    • GTSDUpi.cod