@Test public void testProcessMessage_noNazgul() { SauronAgent sauron = new SauronAgent(); SauronMessageProcessor processor = new SauronMessageProcessor( sauron ); Message msg = new MsgEcho( "ko" ); processor.processMessage( msg ); }
@Override protected void processMessage( Message message ) { NazgulMessageProcessor nazgul = THE_SINGLE_MQ.get( message ); if( nazgul == null ) { this.logger.warning( "No Nazgul was found for message " + message.getClass().getSimpleName() + ". Message is dropped." ); } else { this.logger.finer( "Delegating message " + message.getClass().getSimpleName() + " to Nazgul " + nazgul.getAgentId()); nazgul.processMessageForReal( message ); } }
SauronMessageProcessor extends AgentMessageProcessor { @Override protected void processMessage( Message message ) { NazgulMessageProcessor nazgul = THE_SINGLE_MQ.get( message ); if( nazgul == null ) { this.logger.warning( "No Nazgul was found for message " + message.getClass().getSimpleName() + ". Message is dropped." ); } else { this.logger.finer( "Delegating message " + message.getClass().getSimpleName() + " to Nazgul " + nazgul.getAgentId()); nazgul.processMessageForReal( message ); } } }
SauronMessageProcessor extends AgentMessageProcessor { @Override protected void processMessage( Message message ) { NazgulMessageProcessor nazgul = THE_SINGLE_MQ.get( message ); if( nazgul == null ) { this.logger.warning( "No Nazgul was found for message " + message.getClass().getSimpleName() + ". Message is dropped." ); } else { this.logger.finer( "Delegating message " + message.getClass().getSimpleName() + " to Nazgul " + nazgul.getAgentId()); nazgul.processMessageForReal( message ); } } SauronMessageProcessor( SauronAgent sauronAgent ); }
SauronMessageProcessor extends AgentMessageProcessor { @Override protected void processMessage( Message message ) { NazgulMessageProcessor nazgul = THE_SINGLE_MQ.get( message ); if( nazgul == null ) { this.logger.warning( "No Nazgul was found for message " + message.getClass().getSimpleName() + ". Message is dropped." ); } else { this.logger.finer( "Delegating message " + message.getClass().getSimpleName() + " to Nazgul " + nazgul.getAgentId()); nazgul.processMessageForReal( message ); } } SauronMessageProcessor( SauronAgent sauronAgent );  }
SauronMessageProcessor extends AgentMessageProcessor { @Override protected void processMessage( Message message ) { NazgulMessageProcessor nazgul = THE_SINGLE_MQ.get( message ); if( nazgul == null ) { this.logger.warning( "No Nazgul was found for message " + message.getClass().getSimpleName() + ". Message is dropped." ); } else { this.logger.finer( "Delegating message " + message.getClass().getSimpleName() + " to Nazgul " + nazgul.getAgentId()); nazgul.processMessageForReal( message ); } } SauronMessageProcessor( SauronAgent sauronAgent );   }