private void encodeRefresh(ItemInfo itemInfo, Object[] orderEntries, boolean completed, boolean solicited)
    {

        OMMMsg outmsg = _mgr.getPool().acquireMsg();
        outmsg.setAttribInfo(itemInfo.getOMMAttribInfo());
        outmsg.setItemGroup(0);
        
        // Set the message type to be refresh response.
        outmsg.setMsgType(OMMMsg.MsgType.REFRESH_RESP);
        
        // Set the message model type to be the type requested.
        outmsg.setMsgModelType(RDMMsgTypes.SYMBOL_LIST);
        if (completed)
        {
            // Indicates this message will be the full refresh;
            // or this is the last refresh in the multi-part refresh.
            outmsg.setIndicationFlags(OMMMsg.Indication.REFRESH_COMPLETE);
        }
        if (completed && !itemInfo.isStreamingRequest())
        {
            outmsg.setState(OMMState.Stream.NONSTREAMING, OMMState.Data.OK, OMMState.Code.NONE,
                            "OK");
        }
        else
        {
            outmsg.setState(OMMState.Stream.OPEN, OMMState.Data.OK, OMMState.Code.NONE, "OK");
        }
        
        if (solicited)
            outmsg.setRespTypeNum(OMMMsg.RespType.SOLICITED);
        else
            outmsg.setRespTypeNum(OMMMsg.RespType.UNSOLICITED);
        
        _encoder.initialize(OMMTypes.MSG, 5000);
        _encoder.encodeMsgInit(outmsg, OMMTypes.NO_DATA, OMMTypes.MAP);
        _mgr.getPool().releaseMsg(outmsg);

        int flags = 0;
        if (isEncodeDataDef())
        {
            flags = OMMMap.HAS_DATA_DEFINITIONS;
        }

        _encoder.encodeMapInit(flags, OMMTypes.BUFFER, OMMTypes.FIELD_LIST, 0, (short)0);

        if (isEncodeDataDef())
        {
            encodeDataDef();
        }

        encodeData(orderEntries, isEncodeDataDef());
        _encoder.encodeAggregateComplete(); // MAP
    }