gpt4 book ai didi

java - 远程管理接口(interface) : RemoteAccountService extends Remote

转载 作者:行者123 更新时间:2023-12-01 15:50:23 26 4
gpt4 key购买 nike

我有一个奇怪的问题,我正在阅读Spring Integration文档,在“19. Remoting and web services using Spring”部分下,有一个接口(interface),但没有在任何地方使用。为什么文档要讨论这个接口(interface)?

public interface RemoteAccountService extends Remote {
public void insertAccount(Account account) throws RemoteException;
public List<Account> getAccounts(String name) throws RemoteException;
}

最佳答案

它在 19.5.1 节中为 JAX-RPC 包装器类实现。 。粘贴 19.5.1 部分的前几行下面的讨论:-

/**
* JAX-RPC compliant RemoteAccountService implementation that simply delegates
* to the AccountService implementation in the root web application context.
*
* This wrapper class is necessary because JAX-RPC requires working with dedicated
* endpoint classes. If an existing service needs to be exported, a wrapper that
* extends ServletEndpointSupport for simple application context access is
* the simplest JAX-RPC compliant way.
*
* This is the class registered with the server-side JAX-RPC implementation.
* In the case of Axis, this happens in "server-config.wsdd" respectively via
* deployment calls. The web service engine manages the lifecycle of instances
* of this class: A Spring application context can just be accessed here.
*/import org.springframework.remoting.jaxrpc.ServletEndpointSupport;

public class AccountServiceEndpoint extends ServletEndpointSupport implements RemoteAccountService {

关于java - 远程管理接口(interface) : RemoteAccountService extends Remote,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6190231/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com