How to rewrite the Flat Chain example in Java 7
e.g.
FlatChain theChain = new FlatChain.Builder()
.withOmmConsumer(ommConsumer)
.withChainName(chainName)
.withServiceName(serviceName)
.withNameGuessingOptimization(nbOfNamesToGuessForOptimization)
.onChainComplete(
(chain) ->
printChain(chain)
)
.onChainError(
(errorMessage, chain) ->
System.out.println("\tError received for <" + chain.getName() + ">: " + errorMessage)
)
.build();