Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.bigbluebutton.common.messages;
 
 
 
 	public static final String VOICE_CONF_RECORDING_STARTED  = "voice_conf_recording_started_message";
	public static final String VERSION = "0.0.1";
	public static final String VOICE_CONF_ID = "voice_conf_id";
	public static final String RECORD_STREAM = "record_stream";
	public static final String RECORDING = "recording";
	public static final String TIMESTAMP = "timestamp";
	public final String voiceConfId;
	public final String recordStream;
	public final Boolean recording;
	public final String timestamp;
			String recordStreamBoolean recordingString timestamp) {
		this. = voiceConfId;
		this. = recordStream;
		this. = recording;
		this. = timestamp;
	}
	public String toJson() {
		HashMap<StringObjectpayload = new HashMap<StringObject>();
		return MessageBuilder.buildJson(headerpayload);				
	}
	public static VoiceConfRecordingStartedMessage fromJson(String message) {
		JsonParser parser = new JsonParser();
		JsonObject obj = (JsonObjectparser.parse(message);
		if (obj.has("header") && obj.has("payload")) {
			JsonObject header = (JsonObjectobj.get("header");
			JsonObject payload = (JsonObjectobj.get("payload");
			if (header.has("name")) {
				String messageName = header.get("name").getAsString();
				if (.equals(messageName)) {
					if (payload.has()
							&& payload.has()
							&& payload.has()
							&& payload.has()) {
						String voiceConfId = payload.get().getAsString();
						String recordStream = payload.get().getAsString();
						Boolean recording = payload.get().getAsBoolean();
						String timestamp = payload.get().getAsString();
						return new VoiceConfRecordingStartedMessage(voiceConfIdrecordStreamrecordingtimestamp);					
					}
			}
		}
		return null;
	}
New to GrepCode? Check out our FAQ X