Soak the gammon in plenty of cold water in the fridge for at least two hours, or overnight. Drain well.
Place the gammon along with all the other gammon ingredients in a casserole dish. The liquid should cover the meat; if not, add a little water to just cover. Bring to the boil, then reduce the heat to low and simmer gently, partly covered with a lid, for 1¼ hours. Turn the gammon carefully in the liquid every 20 minutes or so.
Preheat the oven to 200C/180C Fan/Gas 6.
Remove the gammon from its cooking stock, transfer to a small roasting tin. Reserve the cooking liquid for making the sauce.
Cut the rind from the gammon, leaving a thin layer of fat, and discard the rind. With a small sharp knife, score the fat into diamonds.
For the glaze, put a ladleful of cooking liquid into a large clean pan. Add the sugar and chilli powder and cook until a glaze-like consistency. Pour this over the gammon and roast for 15 minutes, until browned and caramelised. Set aside in a warm place while you make the sauce
For the sauce, boil the cooking liquid in a pan, uncovered, over a high heat until it has reduced to about 500ml/17fl oz; this could take about 10 minutes of boiling.
Strain the liquid through a sieve into a clean pan, rubbing any pieces of apple through the sieve too so that the flesh is in the sauce; leave behind only the skins. Taste the sauce and adjust seasoning to taste. If you want it sweeter, add a pinch of demerara sugar; you almost certainly won’t need any salt.
Reheat the remaining strained sauce gently until it reaches a simmer. Blend the cornflour in a little cold water to a smooth paste, and stir into the sauce, stirring continuously. A creamy consistency is better than a very thick sauce, but if you prefer yours thicker, add a little more blended cornflour. To serve, place gammon slices on individual plates and pour over the sauce. Serve with spiced red cabbage and green chilli mash.