private < T extends CommandType > T getCommand ( ) { if ( command == null ) { if ( getPayload ( ) instanceof String ) { this . command = ( T ) marshaller . unmarshal ( new StringSource ( getPayload ( String . class ) ) ) ; } } return ( T ) command ; }
Gets the command if any or tries to unmarshal String payload representation to an command model .