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映射规则。
Server-Side Slice-to-Java Mapping
最新推荐文章于 2025-07-01 15:23:30 发布