Commit 4c121f43 authored by Guillaume Surrel's avatar Guillaume Surrel
Browse files

Add updateType field.

parent 8f4631d2
......@@ -22,19 +22,38 @@
*/
package com.scalagent.appli.client.event.common;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Yohann CINTRE
*/
public class UpdateCompleteEvent extends GwtEvent<UpdateCompleteHandler> {
public static Type<UpdateCompleteHandler> TYPE = new Type<UpdateCompleteHandler>();
public static Type<UpdateCompleteHandler> TYPE = new Type<UpdateCompleteHandler>();
public static final int GENERIC_UPDATE = 0;
public static final int USER_UPDATE = 1;
public static final int TOPIC_UPDATE = 2;
public static final int QUEUE_UPDATE = 3;
public static final int SERVER_INFO_UPDATE = 4;
public static final int SUBSCRIPTION_UPDATE = 5;
String info;
private String info;
private int updateType = GENERIC_UPDATE;
public UpdateCompleteEvent(int updateType) {
this.updateType = updateType;
}
public UpdateCompleteEvent(String info) {
this.info = info;
public UpdateCompleteEvent(int updateType, String info) {
this.info = info;
this.updateType = updateType;
}
@Override
......@@ -44,7 +63,7 @@ public class UpdateCompleteEvent extends GwtEvent<UpdateCompleteHandler> {
@Override
public void dispatch(UpdateCompleteHandler handler) {
handler.onUpdateComplete(info);
handler.onUpdateComplete(updateType, info);
}
}
......@@ -22,13 +22,13 @@
*/
package com.scalagent.appli.client.event.common;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.EventHandler;
/**
* @author Yohann CINTRE
*/
public interface UpdateCompleteHandler extends EventHandler {
public void onUpdateComplete(String info);
public void onUpdateComplete(int updateType, String info);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment