Server-Side Slice-to-Java Mapping

本文详细介绍了Slice数据类型的客户端和服务端Java映射规则,并强调了二者的一致性。此外,还介绍了服务端的一些特殊考虑因素,如初始化、Servant实现及注册等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

The mapping for Slice data types to Java is identical on the client
对于Java来讲,Slice数据类型映射在客户端和服务端是一样的。
side and server side. This means that everything in Client-Side
意思就是,所有的Client-Side Slice-to-Java Mapping底下的内容也都
Slice-to-Java Mapping also applies to the server side. However, for
适用服务端。
the server side, there are a few additional things you need to know
然而,对于服务端来讲,有几点补充说明你需要知道。
— specifically how to:
具体如下:
- Initialize and finalize the server-side run time
初始化和定义服务端,使它运行起来
- Implement servants
实现servants
- Pass parameters and throw exceptions
传递参数抛出异常
- Create servants and register them with the Ice run time
创建servants并且注册运行时的Ice
Because the mapping for Slice data types is identical for clients
由于这Slice数据类型映射对于服务端和客户端是一样的,
and servers, the server-side mapping only adds a few additional
所以这服务端只需要添加一下对客户端的补充机制:
mechanisms to the client side: a small API to initialize and finalize
有些API用来初始化和实现这运行状态
the run time, plus a few rules for how to derive servant classes
加上一些规则为了如何去驱动servant类从skeletons并且如何注册
from skeletons and how to register servants with the server-side
servants用这运行的服务端
run time.
Although the examples we present are very simple, they accurately
尽管我们提出来的例子非常简单,但是它们能很准确的反应写Ice服务器
reflect the basics of writing an Ice server. Of course, for more
的基础。当然,
sophisticated servers, you will be using additional APIs, for
对于复杂的服务器,你就需要使用更多的APIs。
example, to improve performance or scalability. However, these
例如,增加性能或者可扩展性。
APIs are all described in Slice, so, to use these APIs, you need not
然而,这些APIs在Slice里都有描述,因此,如何使用这些APIs,
learn any Java mapping rules beyond those we described here.
你不需要学习任何我们这里描述的之外的Java映射规则。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值