dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kexianjun (GitHub) <git...@apache.org>
Subject [GitHub] [incubator-dubbo-website] kexianjun opened issue #329: Something error with local stub introduction
Date Sat, 16 Mar 2019 01:41:00 GMT
[Local Stub](http://dubbo.apache.org/en-us/docs/user/demos/local-stub.html) introduction has
some error as following 
``` java
package com.foo;
public class BarServiceStub implements BarService {
    private final BarService barService;

    // The real remote proxy object is passed in through the constructor
    public (BarService barService) {
        this.barService = barService;

    public String sayHello(String name) {
        // The following code is executed on the client. You can do local ThreadLocal caching
on the client side, or verify parameters, etc.
        try {
            return barService.sayHello(name);
        } catch (Exception e) {
            // You can return the mock data.
            return "MockData";
the constructor's signature should be
public BarServiceStub(BarService barService)

[ Full content available at: https://github.com/apache/incubator-dubbo-website/issues/329
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

View raw message