当前位置: 首页>>代码示例>>Java>>正文


Java SyncProxy类代码示例

本文整理汇总了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;
		}
	});
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:17,代码来源:RecursiveClassTest.java

示例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;
		}
	});
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:17,代码来源:TypeCheckedObjectsTest.java

示例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;
		}
	});
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:17,代码来源:UnicodeEscapingTest.java

示例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;
		}
	});
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:21,代码来源:RpcTokenTest.java

示例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;
	}
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:22,代码来源:AndroidGWTTestCase.java

示例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();
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:29,代码来源:AndroidGWTTestCase.java

示例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");
	}
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:20,代码来源:HttpsTest.java

示例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;
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:12,代码来源:EnumsTest.java

示例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;
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:8,代码来源:CoreJavaTest.java

示例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;
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:10,代码来源:ValueTypesTest.java

示例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;
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:14,代码来源:RecursiveClassTest.java

示例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;
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:8,代码来源:CollectionsTest.java

示例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;
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:10,代码来源:InheritanceTest.java

示例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;
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:8,代码来源:LoggingRPCTest.java

示例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;
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:8,代码来源:RunTimeSerializationErrorsTest.java


注:本文中的com.gdevelop.gwt.syncrpc.SyncProxy类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。