geoportal-data-viewer-app/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerServiceA...

38 lines
1.0 KiB
Java
Raw Normal View History

2020-10-23 18:18:06 +02:00
package org.gcube.portlets.user.geoportaldataviewer.client;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
2020-10-26 12:24:23 +01:00
public interface GeoportalDataViewerServiceAsync
2020-10-23 18:18:06 +02:00
{
/**
* GWT-RPC service asynchronous (client-side) interface
2020-10-26 12:24:23 +01:00
* @see org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerService
2020-10-23 18:18:06 +02:00
*/
void greetServer( java.lang.String name, AsyncCallback<java.lang.String> callback );
/**
* Utility class to get the RPC Async interface from client-side code
*/
public static final class Util
{
2020-10-26 12:24:23 +01:00
private static GeoportalDataViewerServiceAsync instance;
2020-10-23 18:18:06 +02:00
2020-10-26 12:24:23 +01:00
public static final GeoportalDataViewerServiceAsync getInstance()
2020-10-23 18:18:06 +02:00
{
if ( instance == null )
{
2020-10-26 12:24:23 +01:00
instance = (GeoportalDataViewerServiceAsync) GWT.create( GeoportalDataViewerService.class );
2020-10-23 18:18:06 +02:00
}
return instance;
}
private Util()
{
// Utility class should not be instantiated
}
}
}