本文整理汇总了Java中com.gdevelop.gwt.syncrpc.SyncProxy类的典型用法代码示例。如果您正苦于以下问题:Java SyncProxy类的具体用法?Java SyncProxy怎么用?Java SyncProxy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SyncProxy类属于com.gdevelop.gwt.syncrpc包,在下文中一共展示了SyncProxy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RecursiveClassTest
import com.gdevelop.gwt.syncrpc.SyncProxy; //导入依赖的package包/类
public RecursiveClassTest() throws InterruptedException {
super(MainActivity.class);
setServiceInitTask(new AsyncTask<CountDownLatch, Void, Void>() {
@Override
protected Void doInBackground(CountDownLatch... arg0) {
RecursiveClassTest.this.recursiveClassTestService = SyncProxy
.create(RecursiveClassTestService.class);
((ServiceDefTarget) RecursiveClassTest.this.recursiveClassTestService)
.setServiceEntryPoint(getModuleBaseURL()
+ "recursiveclass");
arg0[0].countDown();
return null;
}
});
}
示例2: TypeCheckedObjectsTest
import com.gdevelop.gwt.syncrpc.SyncProxy; //导入依赖的package包/类
public TypeCheckedObjectsTest() throws InterruptedException {
super(MainActivity.class);
setServiceInitTask(new AsyncTask<CountDownLatch, Void, Void>() {
@Override
protected Void doInBackground(CountDownLatch... arg0) {
TypeCheckedObjectsTest.this.typeCheckedObjectsTestService = SyncProxy
.create(TypeCheckedObjectsTestService.class);
((ServiceDefTarget) TypeCheckedObjectsTest.this.typeCheckedObjectsTestService)
.setServiceEntryPoint(getModuleBaseURL()
+ "typecheckedobjects");
arg0[0].countDown();
return null;
}
});
}
示例3: UnicodeEscapingTest
import com.gdevelop.gwt.syncrpc.SyncProxy; //导入依赖的package包/类
public UnicodeEscapingTest() throws InterruptedException {
super(MainActivity.class);
setServiceInitTask(new AsyncTask<CountDownLatch, Void, Void>() {
@Override
protected Void doInBackground(CountDownLatch... arg0) {
unicodeTestService = SyncProxy
.create(UnicodeEscapingService.class);
((ServiceDefTarget) unicodeTestService)
.setServiceEntryPoint(getModuleBaseURL()
+ "unicodeEscape");
arg0[0].countDown();
return null;
}
});
}
示例4: RpcTokenTest
import com.gdevelop.gwt.syncrpc.SyncProxy; //导入依赖的package包/类
public RpcTokenTest() throws InterruptedException {
super(MainActivity.class);
setServiceInitTask(new AsyncTask<CountDownLatch, Void, Void>() {
@Override
protected Void doInBackground(CountDownLatch... arg0) {
rpcTestService = SyncProxy.create(RpcTokenTestService.class);
((ServiceDefTarget) rpcTestService)
.setServiceEntryPoint(getModuleBaseURL()
+ "rpctokentest");
annotatedRpcTestService = SyncProxy
.create(AnnotatedRpcTokenTestService.class);
((ServiceDefTarget) annotatedRpcTestService)
.setServiceEntryPoint(getModuleBaseURL()
+ "rpctokentest-annotation");
arg0[0].countDown();
return null;
}
});
}
示例5: setUp
import com.gdevelop.gwt.syncrpc.SyncProxy; //导入依赖的package包/类
/**
* @see android.test.ActivityInstrumentationTestCase2#setUp()
*/
@Override
protected void setUp() throws Exception {
super.setUp();
this.overrideTimeout = -1;
for (Class<?> clazz : SyncProxy.getLoggerClasses()) {
FixedAndroidHandler.setupLogger(Logger.getLogger(clazz.getName()));
}
this.task = null;
SyncProxy.setBaseURL(getModuleBaseURL());
// SyncProxy.setLoggingLevel(Level.FINER);
if (!this.serviceTaskAvailable && this.serviceInitTask != null) {
CountDownLatch initSignal = new CountDownLatch(1);
this.serviceInitTask.execute(initSignal);
assertTrue("Failed to init service", initSignal.await(
SPATests.WAIT_TIME_SERVICE_INIT, TimeUnit.SECONDS));
this.serviceTaskAvailable = true;
}
}
示例6: tearDown
import com.gdevelop.gwt.syncrpc.SyncProxy; //导入依赖的package包/类
/**
* @see android.test.ActivityInstrumentationTestCase2#tearDown()
*/
@Override
protected void tearDown() throws Exception {
// Execute the async task on the UI thread! THIS IS KEY!
try {
if (this.task != null) {
runTestOnUiThread(new Runnable() {
@Override
public void run() {
AndroidGWTTestCase.this.task.execute();
}
});
}
} catch (Throwable e) {
throw new RuntimeException(e);
}
if (this.signal != null
&& !this.signal.await(
this.overrideTimeout > 0 ? this.overrideTimeout
: SPATests.WAIT_TIME_MEDIUM, TimeUnit.SECONDS)) {
throw new RuntimeException("Failed to complete");
}
gwtTearDown();
SyncProxy.suppressRelativePathWarning(false);
super.tearDown();
}
示例7: HttpsTest
import com.gdevelop.gwt.syncrpc.SyncProxy; //导入依赖的package包/类
public HttpsTest() throws InterruptedException {
super(MainActivity.class);
final CountDownLatch signal = new CountDownLatch(1);
final AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... arg0) {
service = SyncProxy
.newProxyInstance(ValueTypesTestServiceAsync.class,
"https://10.0.2.2:8888/spawebtest/",
"valuetypes", true);
signal.countDown();
return null;
}
};
task.execute();
if (!signal.await(SPATests.WAIT_TIME_MEDIUM, TimeUnit.SECONDS)) {
throw new RuntimeException("Failed to get service started");
}
}
示例8: getService
import com.gdevelop.gwt.syncrpc.SyncProxy; //导入依赖的package包/类
/**
* @since 0.5
* @return
*/
private EnumsTestServiceAsync getService() {
EnumsTestServiceAsync service = SyncProxy
.create(EnumsTestService.class);
((ServiceDefTarget) service).setServiceEntryPoint(getModuleBaseURL()
+ "enums");
return service;
}
示例9: getServiceAsync
import com.gdevelop.gwt.syncrpc.SyncProxy; //导入依赖的package包/类
private CoreJavaTestServiceAsync getServiceAsync() {
if (this.coreJavaTestService == null) {
this.coreJavaTestService = SyncProxy
.create(CoreJavaTestService.class);
}
return this.coreJavaTestService;
}
示例10: getServiceAsync
import com.gdevelop.gwt.syncrpc.SyncProxy; //导入依赖的package包/类
private ValueTypesTestServiceAsync getServiceAsync() {
if (this.primitiveTypeTestService == null) {
this.primitiveTypeTestService = SyncProxy
.create(ValueTypesTestService.class);
((ServiceDefTarget) this.primitiveTypeTestService)
.setServiceEntryPoint(getModuleBaseURL() + "valuetypes");
}
return this.primitiveTypeTestService;
}
示例11: getServiceAsync
import com.gdevelop.gwt.syncrpc.SyncProxy; //导入依赖的package包/类
/**
* Create a remote service proxy to talk to the server-side Greeting
* service.
*/
private RecursiveClassTestServiceAsync getServiceAsync() {
if (this.recursiveClassTestService == null) {
this.recursiveClassTestService = SyncProxy
.create(RecursiveClassTestService.class);
((ServiceDefTarget) this.recursiveClassTestService)
.setServiceEntryPoint(getModuleBaseURL() + "recursiveclass");
}
return this.recursiveClassTestService;
}
示例12: getServiceAsync
import com.gdevelop.gwt.syncrpc.SyncProxy; //导入依赖的package包/类
private CollectionsTestServiceAsync getServiceAsync() {
if (this.collectionsTestService == null) {
this.collectionsTestService = SyncProxy
.create(CollectionsTestService.class);
}
return this.collectionsTestService;
}
示例13: getServiceAsync
import com.gdevelop.gwt.syncrpc.SyncProxy; //导入依赖的package包/类
private InheritanceTestServiceAsync getServiceAsync() {
if (this.inheritanceTestService == null) {
this.inheritanceTestService = SyncProxy
.create(InheritanceTestService.class);
((ServiceDefTarget) this.inheritanceTestService)
.setServiceEntryPoint(getModuleBaseURL() + "inheritance");
}
return this.inheritanceTestService;
}
示例14: getServiceAsync
import com.gdevelop.gwt.syncrpc.SyncProxy; //导入依赖的package包/类
private LoggingRPCTestServiceAsync getServiceAsync() {
if (this.loggingRPCTestService == null) {
this.loggingRPCTestService = SyncProxy
.create(LoggingRPCTestService.class);
}
return this.loggingRPCTestService;
}
示例15: getService
import com.gdevelop.gwt.syncrpc.SyncProxy; //导入依赖的package包/类
public MixedSerializableEchoServiceAsync getService() {
MixedSerializableEchoServiceAsync service = SyncProxy
.create(MixedSerializableEchoService.class);
((ServiceDefTarget) service).setServiceEntryPoint(getModuleBaseURL()
+ "echo");
return service;
}