private String createEventMessage(long time, String eventName, List<MMTFieldValueHeader> fieldValueElements) {
        String retval = "";
        if(this.payloadFormat.equals(this.RFC2822)){
            retval = createRequestLine(time, eventName);
            for (MMTFieldValueHeader fvh : fieldValueElements) {
                retval = retval + createHeaderLine(fvh);
            }
            retval = retval + CRLF; //We end the Message with an extra CRLF
        }
        
        if(this.payloadFormat.equals(this.JSON)){
            MMTEvent mmtevent = new MMTEvent();
            mmtevent.setProtoName(this.getProtoConfig().getProtocolName());
            mmtevent.setProtoId(this.getProtoConfig().getProtocolID());
            Event event = new Event();
            event.setEventName(eventName);
            event.setServiceId(serviceID);
            event.setTimestamp(time);
            event.setAttributes(fieldValueElements);
            
            mmtevent.setEvent(event);
            
            GsonBuilder gsonBuilder = new GsonBuilder();
            gsonBuilder.registerTypeAdapter(GenericFieldValueHeader.class, new FieldValueAdapter());
            Gson gson = gsonBuilder.create();
            retval = gson.toJson(mmtevent);
            
        }
              
        return retval;
    }