presentation through redis part1
This commit is contained in:
parent
a0b30d3d4f
commit
d30c408ee2
@ -93,4 +93,5 @@ public class Constants {
|
||||
public static final String VIEWER_PASS = "viewer_pass";
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
public static final String CREATE_DATE = "create_date";
|
||||
public static final String PRESENTATION_BASE_URL = "presentation_base_url";
|
||||
}
|
||||
|
@ -18,8 +18,6 @@ public class GetChatHistory implements IMessage {
|
||||
this.meetingId = meetingId;
|
||||
this.replyTo = replyTo;
|
||||
this.requesterId = requesterId;
|
||||
System.out.println("GetChatHistory constructor"+replyTo);
|
||||
System.out.println("GetChatHistory requesterId"+requesterId);
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
@ -28,6 +26,7 @@ public class GetChatHistory implements IMessage {
|
||||
payload.put(Constants.REPLY_TO, replyTo);
|
||||
payload.put(Constants.REQUESTER_ID, requesterId);
|
||||
|
||||
System.out.println("GetChatHistory toJson");
|
||||
java.util.HashMap<String, Object> header = MessageBuilder.buildHeader(GET_CHAT_HISTORY_REQUEST, VERSION, null);
|
||||
return MessageBuilder.buildJson(header, payload);
|
||||
}
|
||||
@ -49,6 +48,7 @@ public class GetChatHistory implements IMessage {
|
||||
String meetingId = payload.get(Constants.MEETING_ID).getAsString();
|
||||
String replyTo = payload.get(Constants.REPLY_TO).getAsString();
|
||||
String requesterId = payload.get(Constants.REQUESTER_ID).getAsString();
|
||||
System.out.println("GetChatHistory fromJson");
|
||||
return new GetChatHistory(meetingId, replyTo, requesterId);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,58 @@
|
||||
package org.bigbluebutton.conference.service.messaging;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
|
||||
public class GetPresentationInfo implements IMessage {
|
||||
public static final String GET_PRESENTATION_INFO = "get_presentation_info";
|
||||
public static final String VERSION = "0.0.1";
|
||||
|
||||
public final String meetingId;
|
||||
public final String requesterId;
|
||||
public final String replyTo;
|
||||
|
||||
public GetPresentationInfo(String meetingId, String requesterId, String replyTo) {
|
||||
this.meetingId = meetingId;
|
||||
this.requesterId = requesterId;
|
||||
this.replyTo = replyTo;
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
HashMap<String, Object> payload = new HashMap<String, Object>();
|
||||
payload.put(Constants.MEETING_ID, meetingId);
|
||||
payload.put(Constants.REQUESTER_ID, requesterId);
|
||||
payload.put(Constants.REPLY_TO, replyTo);
|
||||
|
||||
java.util.HashMap<String, Object> header = MessageBuilder.buildHeader(GET_PRESENTATION_INFO, VERSION, null);
|
||||
System.out.println("GetPresentationInfo toJson");
|
||||
return MessageBuilder.buildJson(header, payload);
|
||||
}
|
||||
|
||||
public static GetPresentationInfo fromJson(String message) {
|
||||
JsonParser parser = new JsonParser();
|
||||
JsonObject obj = (JsonObject) parser.parse(message);
|
||||
|
||||
if (obj.has("header") && obj.has("payload")) {
|
||||
JsonObject header = (JsonObject) obj.get("header");
|
||||
JsonObject payload = (JsonObject) obj.get("payload");
|
||||
|
||||
if (header.has("name")) {
|
||||
String messageName = header.get("name").getAsString();
|
||||
if (GET_PRESENTATION_INFO.equals(messageName)) {
|
||||
if (payload.has(Constants.MEETING_ID)
|
||||
&& payload.has(Constants.REQUESTER_ID)
|
||||
&& payload.has(Constants.REPLY_TO)) {
|
||||
String meetingId = payload.get(Constants.MEETING_ID).getAsString();
|
||||
String requesterId = payload.get(Constants.REQUESTER_ID).getAsString();
|
||||
String replyTo = payload.get(Constants.REPLY_TO).getAsString();
|
||||
System.out.println("GetPresentationInfo fromJson");
|
||||
return new GetPresentationInfo(meetingId, requesterId, replyTo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.bigbluebutton.conference.service.messaging;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
|
||||
public class ResizeAndMoveSlide implements IMessage {
|
||||
public static final String RESIZE_AND_MOVE_SLIDE = "resize_and_move_slide";
|
||||
public static final String VERSION = "0.0.1";
|
||||
|
||||
public final String meetingId;
|
||||
public final double xOffset;
|
||||
public final double yOffset;
|
||||
public final double widthRatio;
|
||||
public final double heightRatio;
|
||||
|
||||
public ResizeAndMoveSlide(String meetingId, double xOffset, double yOffset,
|
||||
double widthRatio, double heightRatio) {
|
||||
this.meetingId = meetingId;
|
||||
this.xOffset = xOffset;
|
||||
this.yOffset = yOffset;
|
||||
this.heightRatio = heightRatio;
|
||||
this.widthRatio = widthRatio;
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
HashMap<String, Object> payload = new HashMap<String, Object>();
|
||||
payload.put(Constants.MEETING_ID, meetingId);
|
||||
payload.put(Constants.X_OFFSET, xOffset);
|
||||
payload.put(Constants.Y_OFFSET, yOffset);
|
||||
payload.put(Constants.HEIGHT_RATIO, heightRatio);
|
||||
payload.put(Constants.WIDTH_RATIO, widthRatio);
|
||||
|
||||
java.util.HashMap<String, Object> header = MessageBuilder.buildHeader(RESIZE_AND_MOVE_SLIDE, VERSION, null);
|
||||
System.out.println("ResizeAndMoveSlide toJson");
|
||||
return MessageBuilder.buildJson(header, payload);
|
||||
}
|
||||
|
||||
public static ResizeAndMoveSlide fromJson(String message) {
|
||||
JsonParser parser = new JsonParser();
|
||||
JsonObject obj = (JsonObject) parser.parse(message);
|
||||
|
||||
if (obj.has("header") && obj.has("payload")) {
|
||||
JsonObject header = (JsonObject) obj.get("header");
|
||||
JsonObject payload = (JsonObject) obj.get("payload");
|
||||
|
||||
if (header.has("name")) {
|
||||
String messageName = header.get("name").getAsString();
|
||||
if (RESIZE_AND_MOVE_SLIDE.equals(messageName)) {
|
||||
if (payload.has(Constants.MEETING_ID)
|
||||
&& payload.has(Constants.X_OFFSET)
|
||||
&& payload.has(Constants.Y_OFFSET)
|
||||
&& payload.has(Constants.HEIGHT_RATIO)
|
||||
&& payload.has(Constants.WIDTH_RATIO)) {
|
||||
String meetingId = payload.get(Constants.MEETING_ID).getAsString();
|
||||
double xOffset = payload.get(Constants.X_OFFSET).getAsDouble();
|
||||
double yOffset = payload.get(Constants.Y_OFFSET).getAsDouble();
|
||||
double heightRatio = payload.get(Constants.HEIGHT_RATIO).getAsDouble();
|
||||
double widthRatio = payload.get(Constants.WIDTH_RATIO).getAsDouble();
|
||||
System.out.println("ResizeAndMoveSlide fromJson");
|
||||
return new ResizeAndMoveSlide(meetingId, xOffset, yOffset, widthRatio, heightRatio);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package org.bigbluebutton.conference.service.messaging;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
|
||||
public class SendConversionCompleted implements IMessage {
|
||||
public static final String SEND_CONVERSION_COMPLETED = "send_conversion_completed";
|
||||
public static final String VERSION = "0.0.1";
|
||||
|
||||
public final String meetingId;
|
||||
public final String messageKey;
|
||||
public final String code;
|
||||
public final String presId;
|
||||
public final int numPages;
|
||||
public final String presName;
|
||||
public final String presBaseUrl;
|
||||
|
||||
public SendConversionCompleted(String messageKey, String meetingId, String code,
|
||||
String presId, int numPages, String presName, String presBaseUrl) {
|
||||
this.meetingId = meetingId;
|
||||
this.messageKey = messageKey;
|
||||
this.code = code;
|
||||
this.presId = presId;
|
||||
this.numPages = numPages;
|
||||
this.presName = presName;
|
||||
this.presBaseUrl = presBaseUrl;
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
HashMap<String, Object> payload = new HashMap<String, Object>();
|
||||
payload.put(Constants.MEETING_ID, meetingId);
|
||||
payload.put(Constants.MESSAGE_KEY, messageKey);
|
||||
payload.put(Constants.CODE, code);
|
||||
payload.put(Constants.PRESENTATION_ID, presId);
|
||||
payload.put(Constants.NUM_PAGES, numPages);
|
||||
payload.put(Constants.PRESENTATION_NAME, presName);
|
||||
payload.put(Constants.PRESENTATION_BASE_URL, presBaseUrl);
|
||||
|
||||
java.util.HashMap<String, Object> header = MessageBuilder.buildHeader(SEND_CONVERSION_COMPLETED, VERSION, null);
|
||||
System.out.println("SendConversionCompleted toJson");
|
||||
return MessageBuilder.buildJson(header, payload);
|
||||
}
|
||||
|
||||
public static SendConversionCompleted fromJson(String message) {
|
||||
JsonParser parser = new JsonParser();
|
||||
JsonObject obj = (JsonObject) parser.parse(message);
|
||||
|
||||
if (obj.has("header") && obj.has("payload")) {
|
||||
JsonObject header = (JsonObject) obj.get("header");
|
||||
JsonObject payload = (JsonObject) obj.get("payload");
|
||||
|
||||
if (header.has("name")) {
|
||||
String messageName = header.get("name").getAsString();
|
||||
if (SEND_CONVERSION_COMPLETED.equals(messageName)) {
|
||||
if (payload.has(Constants.MEETING_ID)
|
||||
&& payload.has(Constants.MESSAGE_KEY)
|
||||
&& payload.has(Constants.CODE)
|
||||
&& payload.has(Constants.PRESENTATION_ID)
|
||||
&& payload.has(Constants.NUM_PAGES)
|
||||
&& payload.has(Constants.PRESENTATION_NAME)
|
||||
&& payload.has(Constants.PRESENTATION_BASE_URL)) {
|
||||
String meetingId = payload.get(Constants.MEETING_ID).getAsString();
|
||||
String messageKey = payload.get(Constants.MESSAGE_KEY).getAsString();
|
||||
String code = payload.get(Constants.CODE).getAsString();
|
||||
String presId = payload.get(Constants.PRESENTATION_ID).getAsString();
|
||||
int numPages = payload.get(Constants.NUM_PAGES).getAsInt();
|
||||
String presName = payload.get(Constants.PRESENTATION_NAME).getAsString();
|
||||
String presBaseUrl = payload.get(Constants.PRESENTATION_BASE_URL).getAsString();
|
||||
|
||||
System.out.println("SendConversionCompleted fromJson");
|
||||
return new SendConversionCompleted(messageKey, meetingId, code, presId, numPages, presName, presBaseUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package org.bigbluebutton.conference.service.messaging;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
|
||||
public class SendConversionUpdate implements IMessage {
|
||||
public static final String SEND_CONVERSION_UPDATE = "send_conversion_update";
|
||||
public static final String VERSION = "0.0.1";
|
||||
|
||||
public final String meetingId;
|
||||
public final String messageKey;
|
||||
public final String code;
|
||||
public final String presId;
|
||||
public final String presName;
|
||||
|
||||
|
||||
public SendConversionUpdate(String messageKey, String meetingId,
|
||||
String code, String presId, String presName) {
|
||||
this.meetingId = meetingId;
|
||||
this.messageKey = messageKey;
|
||||
this.code = code;
|
||||
this.presId = presId;
|
||||
this.presName = presName;
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
HashMap<String, Object> payload = new HashMap<String, Object>();
|
||||
payload.put(Constants.MEETING_ID, meetingId);
|
||||
payload.put(Constants.MESSAGE_KEY, messageKey);
|
||||
payload.put(Constants.CODE, code);
|
||||
payload.put(Constants.PRESENTATION_ID, presId);
|
||||
payload.put(Constants.PRESENTATION_NAME, presName);
|
||||
|
||||
java.util.HashMap<String, Object> header = MessageBuilder.buildHeader(SEND_CONVERSION_UPDATE, VERSION, null);
|
||||
System.out.println("SendConversionUpdate toJson");
|
||||
return MessageBuilder.buildJson(header, payload);
|
||||
}
|
||||
|
||||
public static SendConversionUpdate fromJson(String message) {
|
||||
JsonParser parser = new JsonParser();
|
||||
JsonObject obj = (JsonObject) parser.parse(message);
|
||||
|
||||
if (obj.has("header") && obj.has("payload")) {
|
||||
JsonObject header = (JsonObject) obj.get("header");
|
||||
JsonObject payload = (JsonObject) obj.get("payload");
|
||||
|
||||
if (header.has("name")) {
|
||||
String messageName = header.get("name").getAsString();
|
||||
if (SEND_CONVERSION_UPDATE.equals(messageName)) {
|
||||
if (payload.has(Constants.MEETING_ID)
|
||||
&& payload.has(Constants.MESSAGE_KEY)
|
||||
&& payload.has(Constants.CODE)
|
||||
&& payload.has(Constants.PRESENTATION_NAME)
|
||||
&& payload.has(Constants.PRESENTATION_ID)) {
|
||||
String meetingId = payload.get(Constants.MEETING_ID).getAsString();
|
||||
String code = payload.get(Constants.CODE).getAsString();
|
||||
String messageKey = payload.get(Constants.MESSAGE_KEY).getAsString();
|
||||
String presId = payload.get(Constants.PRESENTATION_ID).getAsString();
|
||||
String presName = payload.get(Constants.PRESENTATION_NAME).getAsString();
|
||||
System.out.println("SendConversionUpdate fromJson");
|
||||
return new SendConversionUpdate(messageKey, meetingId, code, presId, presName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -19,16 +19,16 @@
|
||||
package org.bigbluebutton.conference.service.presentation;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
|
||||
import org.bigbluebutton.core.api.Red5BBBInGw;
|
||||
import org.red5.logging.Red5LoggerFactory;
|
||||
|
||||
public class PresentationApplication {
|
||||
private static Logger log = Red5LoggerFactory.getLogger( PresentationApplication.class, "bigbluebutton" );
|
||||
|
||||
private IBigBlueButtonInGW bbbInGW;
|
||||
private Red5BBBInGw Red5BBBInGw;
|
||||
|
||||
public void setBigBlueButtonInGW(IBigBlueButtonInGW inGW) {
|
||||
bbbInGW = inGW;
|
||||
public void setBigBlueButtonInGW(Red5BBBInGw inGW) {
|
||||
Red5BBBInGw = inGW;
|
||||
}
|
||||
|
||||
public void clear(String meetingID) {
|
||||
@ -37,61 +37,72 @@ public class PresentationApplication {
|
||||
|
||||
public void sendConversionUpdate(String messageKey, String meetingId,
|
||||
String code, String presentationId, String presName) {
|
||||
bbbInGW.sendConversionUpdate(messageKey, meetingId, code,
|
||||
System.out.println("-----sendConversionUpdate---");
|
||||
Red5BBBInGw.sendConversionUpdate(messageKey, meetingId, code,
|
||||
presentationId, presName);
|
||||
}
|
||||
|
||||
public void sendPageCountError(String messageKey, String meetingId,
|
||||
String code, String presentationId, int numberOfPages,
|
||||
int maxNumberPages, String presName) {
|
||||
bbbInGW.sendPageCountError(messageKey, meetingId, code,
|
||||
presentationId, numberOfPages, maxNumberPages, presName);
|
||||
System.out.println("-----sendPageCountError---");
|
||||
// bbbInGW.sendPageCountError(messageKey, meetingId, code,
|
||||
// presentationId, numberOfPages, maxNumberPages, presName);
|
||||
}
|
||||
|
||||
public void sendSlideGenerated(String messageKey, String meetingId,
|
||||
String code, String presentationId, int numberOfPages,
|
||||
int pagesCompleted, String presName) {
|
||||
bbbInGW.sendSlideGenerated(messageKey, meetingId, code,
|
||||
presentationId, numberOfPages, pagesCompleted, presName);
|
||||
System.out.println("-----sendSlideGenerated---");
|
||||
// bbbInGW.sendSlideGenerated(messageKey, meetingId, code,
|
||||
// presentationId, numberOfPages, pagesCompleted, presName);
|
||||
}
|
||||
|
||||
public void sendConversionCompleted(String messageKey, String meetingId,
|
||||
String code, String presentation, int numberOfPages,
|
||||
String presName, String presBaseUrl) {
|
||||
bbbInGW.sendConversionCompleted(messageKey, meetingId,
|
||||
System.out.println("-----sendConversionCompleted---");
|
||||
Red5BBBInGw.sendConversionCompleted(messageKey, meetingId,
|
||||
code, presentation, numberOfPages, presName, presBaseUrl);
|
||||
}
|
||||
|
||||
public void removePresentation(String meetingID, String presentationID){
|
||||
bbbInGW.removePresentation(meetingID, presentationID);
|
||||
System.out.println("----removePresentation----");
|
||||
// bbbInGW.removePresentation(meetingID, presentationID);
|
||||
}
|
||||
|
||||
public void getPresentationInfo(String meetingID, String requesterID) {
|
||||
// Just hardcode as we don't really need it for flash client. (ralam may 7, 2014)
|
||||
String replyTo = meetingID + "/" + requesterID;
|
||||
bbbInGW.getPresentationInfo(meetingID, requesterID, replyTo);
|
||||
System.out.println("----getPresentationInfo----");
|
||||
Red5BBBInGw.getPresentationInfo(meetingID, requesterID, replyTo);
|
||||
}
|
||||
|
||||
public void sendCursorUpdate(String meetingID, Double xPercent, Double yPercent) {
|
||||
bbbInGW.sendCursorUpdate(meetingID, xPercent, yPercent);
|
||||
System.out.println("----sendCursorUpdate----");
|
||||
// bbbInGW.sendCursorUpdate(meetingID, xPercent, yPercent);
|
||||
}
|
||||
|
||||
public void resizeAndMoveSlide(String meetingID, Double xOffset, Double yOffset, Double widthRatio, Double heightRatio) {
|
||||
bbbInGW.resizeAndMoveSlide(meetingID, xOffset, yOffset, widthRatio, heightRatio);
|
||||
System.out.println("-----resizeAndMoveSlide---");
|
||||
Red5BBBInGw.resizeAndMoveSlide(meetingID, xOffset, yOffset, widthRatio, heightRatio);
|
||||
}
|
||||
|
||||
public void gotoSlide(String meetingID, String pageId){
|
||||
bbbInGW.gotoSlide(meetingID, pageId);
|
||||
System.out.println("----gotoSlide----");
|
||||
// bbbInGW.gotoSlide(meetingID, pageId);
|
||||
}
|
||||
|
||||
public void sharePresentation(String meetingID, String presentationID, Boolean share){
|
||||
bbbInGW.sharePresentation(meetingID, presentationID, share);
|
||||
System.out.println("-----sharePresentation---");
|
||||
// bbbInGW.sharePresentation(meetingID, presentationID, share);
|
||||
}
|
||||
|
||||
public void getSlideInfo(String meetingID, String requesterID) {
|
||||
// Just hardcode as we don't really need it for flash client. (ralam may 7, 2014)
|
||||
System.out.println("----getSlideInfo----");
|
||||
String replyTo = meetingID + "/" + requesterID;
|
||||
bbbInGW.getSlideInfo(meetingID, requesterID, replyTo);
|
||||
// bbbInGW.getSlideInfo(meetingID, requesterID, replyTo);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,11 +2,22 @@ package org.bigbluebutton.conference.service.presentation;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bigbluebutton.conference.service.messaging.GetChatHistory;
|
||||
import org.bigbluebutton.conference.service.messaging.GetPresentationInfo;
|
||||
import org.bigbluebutton.conference.service.messaging.MessagingConstants;
|
||||
import org.bigbluebutton.conference.service.messaging.ResizeAndMoveSlide;
|
||||
import org.bigbluebutton.conference.service.messaging.SendConversionCompleted;
|
||||
import org.bigbluebutton.conference.service.messaging.SendConversionUpdate;
|
||||
import org.bigbluebutton.conference.service.messaging.SendPrivateChatMessage;
|
||||
import org.bigbluebutton.conference.service.messaging.SendPublicChatMessage;
|
||||
import org.bigbluebutton.conference.service.messaging.redis.MessageHandler;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
|
||||
|
||||
import com.google.gson.JsonParser;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
@ -66,7 +77,41 @@ public class PresentationMessageListener implements MessageHandler {
|
||||
conversionUpdatesProcessor.sendConversionCompleted(messageKey, conference,
|
||||
code, presId, numberOfPages, filename, presBaseUrl);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void handleMessage(String pattern, String channel, String message) {
|
||||
if (channel.equalsIgnoreCase(MessagingConstants.TO_CHAT_CHANNEL)) {
|
||||
JsonParser parser = new JsonParser();
|
||||
JsonObject obj = (JsonObject) parser.parse(message);
|
||||
|
||||
if (obj.has("header") && obj.has("payload")) {
|
||||
JsonObject header = (JsonObject) obj.get("header");
|
||||
|
||||
if (header.has("name")) {
|
||||
String messageName = header.get("name").getAsString();
|
||||
if (SendConversionUpdate.SEND_CONVERSION_UPDATE.equals(messageName)) {
|
||||
SendConversionUpdate msg = SendConversionUpdate.fromJson(message);
|
||||
System.out.println("in messageHandler - sendConversionCompleted");
|
||||
sendConversionUpdate(msg.messageKey, msg.meetingId, msg.code, msg.presId, msg.presName);
|
||||
bbbInGW.sendConversionUpdate(msg.messageKey, msg.meetingId, msg.code, msg.presId, msg.presName);
|
||||
} else if (ResizeAndMoveSlide.RESIZE_AND_MOVE_SLIDE.equals(messageName)) {
|
||||
System.out.println("in messageHandler - resizeAndMoveSlide");
|
||||
ResizeAndMoveSlide msg = ResizeAndMoveSlide.fromJson(message);
|
||||
bbbInGW.resizeAndMoveSlide(msg.meetingId, msg.xOffset, msg.yOffset, msg.widthRatio, msg.heightRatio);
|
||||
} else if (GetPresentationInfo.GET_PRESENTATION_INFO.equals(messageName)) {
|
||||
System.out.println("in messageHandler - getPresentationInfo");
|
||||
GetPresentationInfo msg = GetPresentationInfo.fromJson(message);
|
||||
bbbInGW.getPresentationInfo(msg.meetingId, msg.requesterId, msg.replyTo);
|
||||
} else if (SendConversionCompleted.SEND_CONVERSION_COMPLETED.equals(messageName)) {
|
||||
System.out.println("in messageHandler - sendConversionCompleted");
|
||||
SendConversionCompleted msg = SendConversionCompleted.fromJson(message);
|
||||
bbbInGW.sendConversionCompleted(msg.messageKey, msg.meetingId, msg.code, msg.presId, msg.numPages, msg.presName, msg.presBaseUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
@Override
|
||||
public void handleMessage(String pattern, String channel, String message) {
|
||||
|
||||
@ -144,4 +189,5 @@ public class PresentationMessageListener implements MessageHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
@ -2,11 +2,15 @@ package org.bigbluebutton.core.api;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.bigbluebutton.conference.service.messaging.GetChatHistory;
|
||||
import org.bigbluebutton.conference.service.messaging.MessagingConstants;
|
||||
import org.bigbluebutton.conference.service.messaging.SendPublicChatMessage;
|
||||
import org.bigbluebutton.conference.service.messaging.MessagingConstants;
|
||||
import org.bigbluebutton.conference.service.messaging.GetPresentationInfo;
|
||||
import org.bigbluebutton.conference.service.messaging.SendConversionCompleted;
|
||||
import org.bigbluebutton.conference.service.messaging.ValidateAuthTokenMessage;
|
||||
import org.bigbluebutton.conference.service.messaging.ResizeAndMoveSlide;
|
||||
import org.bigbluebutton.conference.service.messaging.MessagingConstants;
|
||||
import org.bigbluebutton.conference.service.messaging.SendConversionUpdate;
|
||||
import org.bigbluebutton.conference.service.messaging.SendPrivateChatMessage;
|
||||
import org.bigbluebutton.conference.service.messaging.SendPublicChatMessage;
|
||||
import org.bigbluebutton.conference.service.messaging.GetChatHistory;
|
||||
import org.bigbluebutton.conference.service.messaging.redis.MessageSender;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
@ -311,7 +315,10 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
|
||||
@Override
|
||||
public void getPresentationInfo(String meetingID, String requesterID,
|
||||
String replyTo) {
|
||||
// TODO Auto-generated method stub
|
||||
GetPresentationInfo msg = new GetPresentationInfo(meetingID,
|
||||
requesterID, replyTo);
|
||||
System.out.println("~~getPresentationInfo in Red5BBBInGw");
|
||||
sender.send(MessagingConstants.TO_PRESENTATION_CHANNEL, msg.toJson());
|
||||
|
||||
}
|
||||
|
||||
@ -325,8 +332,11 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
|
||||
@Override
|
||||
public void resizeAndMoveSlide(String meetingID, double xOffset,
|
||||
double yOffset, double widthRatio, double heightRatio) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
System.out.println("~~resizeAndMoveSlide in Red5BBBInGw");
|
||||
ResizeAndMoveSlide msg = new ResizeAndMoveSlide(meetingID,
|
||||
xOffset, yOffset, widthRatio, heightRatio);
|
||||
sender.send(MessagingConstants.TO_PRESENTATION_CHANNEL, msg.toJson());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -352,8 +362,10 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
|
||||
@Override
|
||||
public void sendConversionUpdate(String messageKey, String meetingId,
|
||||
String code, String presId, String presName) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
System.out.println("~~sendConversionUpdate in Red5BBBInGw");
|
||||
SendConversionUpdate msg = new SendConversionUpdate(messageKey, meetingId,
|
||||
code, presId, presName);
|
||||
sender.send(MessagingConstants.TO_PRESENTATION_CHANNEL, msg.toJson());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -376,8 +388,10 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
|
||||
public void sendConversionCompleted(String messageKey, String meetingId,
|
||||
String code, String presId, int numPages, String presName,
|
||||
String presBaseUrl) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
System.out.println("~~sendConversionCompleted in Red5BBBInGw");
|
||||
SendConversionCompleted msg = new SendConversionCompleted(messageKey, meetingId,
|
||||
code, presId, numPages, presName, presBaseUrl);
|
||||
sender.send(MessagingConstants.TO_PRESENTATION_CHANNEL, msg.toJson());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -444,6 +458,7 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
|
||||
@Override
|
||||
public void getChatHistory(String meetingID, String requesterID,
|
||||
String replyTo) {
|
||||
System.out.println("~~getChatHistory in Red5BBBInGw");
|
||||
GetChatHistory msg = new GetChatHistory(meetingID, requesterID, replyTo);
|
||||
sender.send(MessagingConstants.TO_CHAT_CHANNEL, msg.toJson());
|
||||
}
|
||||
@ -451,6 +466,7 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
|
||||
@Override
|
||||
public void sendPublicMessage(String meetingID, String requesterID,
|
||||
Map<String, String> message) {
|
||||
System.out.println("~~sendPublicMessage in Red5BBBInGw");
|
||||
SendPublicChatMessage msg = new SendPublicChatMessage(meetingID, requesterID, message);
|
||||
sender.send(MessagingConstants.TO_CHAT_CHANNEL, msg.toJson());
|
||||
}
|
||||
@ -458,8 +474,9 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
|
||||
@Override
|
||||
public void sendPrivateMessage(String meetingID, String requesterID,
|
||||
Map<String, String> message) {
|
||||
|
||||
|
||||
System.out.println("~~sendPrivateMessage in Red5BBBInGw");
|
||||
SendPrivateChatMessage msg = new SendPrivateChatMessage(meetingID, requesterID, message);
|
||||
sender.send(MessagingConstants.TO_CHAT_CHANNEL, msg.toJson());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
|
||||
Copyright (c) 2014 BigBlueButton Inc. and by respective authors (see below).
|
||||
Copyright (c) 2015 BigBlueButton Inc. and by respective authors (see below).
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU Lesser General Public License as published by the Free Software
|
||||
@ -26,9 +26,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
http://www.springframework.org/schema/util
|
||||
http://www.springframework.org/schema/util/spring-util-2.0.xsd
|
||||
">
|
||||
|
||||
|
||||
<bean id="presentationApplication" class="org.bigbluebutton.conference.service.presentation.PresentationApplication">
|
||||
<property name="bigBlueButtonInGW"> <ref bean="bbbInGW"/></property>
|
||||
<property name="bigBlueButtonInGW"> <ref bean="red5BbbInGW"/></property>
|
||||
</bean>
|
||||
|
||||
<bean id="presentation.service" class="org.bigbluebutton.conference.service.presentation.PresentationService">
|
||||
|
Loading…
Reference in New Issue
Block a user