搜索

284.4. 使用

download PDF

要调用在 RMI registry 中注册的现有 RMI 服务,请创建一个类似如下的路由:

from("pojo:foo").to("rmi://localhost:1099/foo");

要在 RMI registry 中绑定现有的 camel 处理器或服务,请定义一个 RMI 端点,如下所示:

RmiEndpoint endpoint= (RmiEndpoint) endpoint("rmi://localhost:1099/bar");
endpoint.setRemoteInterfaces(ISay.class);
from(endpoint).to("pojo:bar");

请注意,当绑定 RMI 消费者端点时,您必须指定公开的 远程 接口。

在 XML DSL 中,您可以按以下方式从 Camel 2.7 开始:

    <camel:route>
        <from uri="rmi://localhost:37541/helloServiceBean?remoteInterfaces=org.apache.camel.example.osgi.HelloService"/>
        <to uri="bean:helloServiceBean"/>
    </camel:route>
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.