public boolean send ( int id , Goal msg ) { AObject obj = agents . get ( id ) ; if ( obj == null ) { logger . warn ( "{} attempted to send a message to unknown agent id '{}'" , Log . logPrefix ( getId ( ) ) , id ) ; return false ; } logger . debug ( "{} is sending message of type {} to agent {}" , Log . logPrefix ( getId ( ) ) , msg . getClass ( ) . getSimpleName ( ) , id ) ; ( ( Agent ) obj ) . post ( msg ) ; return true ; }
Send a message to an agent .