AsynCallbackDeleteObject.java :  » Network » socialconferenceproject » at » socialconference » web » client » util » Android Open Source

Android Open Source » Network » socialconferenceproject 
socialconferenceproject » at » socialconference » web » client » util » AsynCallbackDeleteObject.java
package at.socialconference.web.client.util;

import at.socialconference.inter.connection.protocol.SocketProtocol;

import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;

public class AsynCallbackDeleteObject implements AsyncCallback<Integer> {
  @Override
  public void onFailure(Throwable caught) {
    Window.alert("Could not reach server");  
  }
  @Override
  public void onSuccess(Integer result) {
    switch (result) {
      case SocketProtocol.RESP_WRONG_OBJECT:
        Window.alert("The passed object is not valid");
        break;
      case SocketProtocol.OK:
        Window.alert("Deleted successfully");
        break;
      case -1:
        Window.alert("Internal server error");
        break;
      default:
        Window.alert("Internal server error: Illegal state");
    }
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.