public boolean updateAttributes ( final Collection < Attribute > attrToSend ) { if ( ! this . sentAttrSpecifications ) { log . error ( "Haven't sent type specifications yet, can't send solutions." ) ; return false ; } for ( Iterator < Attribute > iter = attrToSend . iterator ( ) ; iter . hasNext ( ) ; ) { Attribute soln = iter . next ( ) ; Integer solutionTypeAlias = this . attributeAliases . get ( soln . getAttributeName ( ) ) ; if ( solutionTypeAlias == null ) { log . error ( "Cannot send solution: Unregistered attribute type: {}" , soln . getAttributeName ( ) ) ; iter . remove ( ) ; continue ; } soln . setAttributeNameAlias ( solutionTypeAlias . intValue ( ) ) ; } AttributeUpdateMessage message = new AttributeUpdateMessage ( ) ; message . setCreateId ( this . createIds ) ; message . setAttributes ( attrToSend . toArray ( new Attribute [ ] { } ) ) ; this . session . write ( message ) ; log . debug ( "Sent {} to {}" , message , this ) ; return true ; }
Sends a multiple Attribute update messages to the world model .