本文整理汇总了Java中com.google.gwtjsonrpc.common.RemoteJsonService类的典型用法代码示例。如果您正苦于以下问题:Java RemoteJsonService类的具体用法?Java RemoteJsonService怎么用?Java RemoteJsonService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RemoteJsonService类属于com.google.gwtjsonrpc.common包,在下文中一共展示了RemoteJsonService类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: get
import com.google.gwtjsonrpc.common.RemoteJsonService; //导入依赖的package包/类
@Override
public GerritJsonServlet get() {
final RemoteJsonService srv = injector.getInstance(serviceClass);
return injector
.createChildInjector(
new AbstractModule() {
@Override
protected void configure() {
bind(RemoteJsonService.class).toInstance(srv);
}
})
.getInstance(GerritJsonServlet.class);
}
示例2: rpc
import com.google.gwtjsonrpc.common.RemoteJsonService; //导入依赖的package包/类
protected void rpc(Class<? extends RemoteJsonService> clazz) {
String name = clazz.getSimpleName();
if (name.endsWith("Impl")) {
name = name.substring(0, name.length() - 4);
}
rpc(name, clazz);
}
示例3: GerritJsonServletProvider
import com.google.gwtjsonrpc.common.RemoteJsonService; //导入依赖的package包/类
@Inject
GerritJsonServletProvider(Class<? extends RemoteJsonService> c) {
serviceClass = c;
}
示例4: GerritJsonServlet
import com.google.gwtjsonrpc.common.RemoteJsonService; //导入依赖的package包/类
@Inject
GerritJsonServlet(final DynamicItem<WebSession> w, RemoteJsonService s, AuditService a) {
session = w;
service = s;
audit = a;
}
示例5: registerService
import com.google.gwtjsonrpc.common.RemoteJsonService; //导入依赖的package包/类
/**
* Register a new JSON-RPC service. Note that security clearance will be performed server-side.
*
* <pre>
* <servlet>
* <servlet-name>service_name</servlet-name>
* <servlet-class>class_implementing_the_service</servlet-class>
* </servlet>
* <servlet-mapping>
* <servlet-name>service_name</servlet-name>
* <url-pattern>/module_name/service_name</url-pattern>
* </servlet-mapping>
* </pre>
*
* @param service must extend SecureService and must be created using GWT.create()
* @param name service_name
*/
public void registerService(RemoteJsonService service, String name) {
JsonUtil.bind(service, name);
}