public void process ( final T command ) { boolean traceStarted = false ; incrementCommandsProcessed ( ) ; DehydratedExecutionContext ctx = null ; try { validateCommand ( command ) ; CommandResolver < T > resolver = createCommandResolver ( command , tracer ) ; ctx = resolver . resolveExecutionContext ( ) ; List < ExecutionCommand > executionCommands = resolver . resolveExecutionCommands ( ) ; if ( executionCommands . size ( ) > 1 ) { throw new CougarFrameworkException ( "Resolved >1 command in a non-batch call!" ) ; } ExecutionCommand exec = executionCommands . get ( 0 ) ; tracer . start ( ctx . getRequestUUID ( ) , exec . getOperationKey ( ) ) ; traceStarted = true ; executeCommand ( exec , ctx ) ; } catch ( CougarException ce ) { executeError ( command , ctx , ce , traceStarted ) ; } catch ( Exception e ) { executeError ( command , ctx , new CougarFrameworkException ( "Unexpected exception while processing transport command" , e ) , traceStarted ) ; } }
Processes a TransportCommand .