当前位置: 首页>>代码示例>>Java>>正文


Java ClientApp类代码示例

本文整理汇总了Java中com.progressoft.brix.domino.api.client.ClientApp的典型用法代码示例。如果您正苦于以下问题:Java ClientApp类的具体用法?Java ClientApp怎么用?Java ClientApp使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ClientApp类属于com.progressoft.brix.domino.api.client包,在下文中一共展示了ClientApp类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
public static void init() {
    ClientRouter clientRouter = new ClientRouter(new DesktopClientEventFactory());
    ServerRouter serverRouter = new ServerRouter(new DesktopRequestAsyncSender(new DesktopServerRequestEventFactory()));
    ClientApp.ClientAppBuilder
            .clientRouter(clientRouter)
            .serverRouter(serverRouter)
            .eventsBus(new DesktopEventBus())
            .requestRepository(new InMemoryCommandsRepository())
            .presentersRepository(new InMemoryPresentersRepository())
            .viewsRepository(new InMemoryViewRepository())
            .contributionsRepository(new InMemoryContributionRepository())
            .requestSendersRepository(new InMemoryRequestRestSendersRepository())
            .history(new DesktopStateHistory())
            .asyncRunner(AsyncRunner.AsyncTask::onSuccess).mainExtensionPoint(new CoreMainExtensionPoint())
            .dominoOptions(new DesktopDominoOptions())
            .build();
}
 
开发者ID:GwtDomino,项目名称:domino,代码行数:18,代码来源:CoreModule.java

示例2: sendRequest

import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
protected void sendRequest(ServerRequest request, ServerRequestEventFactory requestEventFactory) {
    ClientApp.make().getRequestRestSendersRepository().get(request.getKey())
            .send(request.requestBean(), request.headers(),
                    new ServerRequestCallBack() {
                        @Override
                        public void onFailure(Throwable throwable) {
                            requestEventFactory.makeFailed(request, throwable).fire();
                        }

                        @Override
                        public void onSuccess(ResponseBean response) {
                            requestEventFactory.makeSuccess(request, response).fire();
                        }
                    });
}
 
开发者ID:GwtDomino,项目名称:domino,代码行数:18,代码来源:GwtRequestAsyncSender.java

示例3: init

import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
public static void init() {
    GWT.setUncaughtExceptionHandler(throwable -> LOGGER.error("Uncaught Exception", throwable));
    ClientRouter clientRouter = new ClientRouter(new ClientEventFactory());
    ServerRouter serverRouter = new ServerRouter(new GwtRequestAsyncSender(new ServerEventFactory()));
    RequestEventProcessor requestEventProcessor = new RequestEventProcessor();
    SimpleEventsBus eventBus = new SimpleEventsBus(requestEventProcessor);
    ClientApp.ClientAppBuilder
            .clientRouter(clientRouter)
            .serverRouter(serverRouter)
            .eventsBus(eventBus)
            .requestRepository(new InMemoryCommandsRepository())
            .presentersRepository(new InMemoryPresentersRepository())
            .viewsRepository(new InMemoryViewRepository())
            .contributionsRepository(new InMemoryContributionRepository())
            .requestSendersRepository(new InMemoryRequestRestSendersRepository())
            .history(new StateHistory())
            .asyncRunner(new GwtAsyncRunner())
            .mainExtensionPoint(new CoreMainExtensionPoint())
            .dominoOptions(new RestyGwtOptions())
            .build();
}
 
开发者ID:GwtDomino,项目名称:domino,代码行数:22,代码来源:CoreModule.java

示例4: main

import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
public static void main(String[] args) {
    CoreModule.init();
    ModuleConfigurationsLoader.load();
    ClientApp.make().run(dominoOptions -> {
        if(args.length>1) {
            String defaultServiceRoot = "http://" + args[0] + ":" + args[1] + "/service";
            dominoOptions.setDefaultServiceRoot(defaultServiceRoot);
            LOGGER.info("Application is now connected to : "+defaultServiceRoot);
        }else {
            LOGGER.info("Application is now connected to : http://localhost:8080");
        }
    });
}
 
开发者ID:GwtDomino,项目名称:domino-todolist,代码行数:14,代码来源:DesktopClientModule.java

示例5: routeRequest

import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
@Override
public void routeRequest(final PresenterCommand presenterCommand) {

    ClientApp.make().getAsyncRunner().runAsync(new AsyncRunner.AsyncTask() {
        @Override
        public void onSuccess() {
            requestEventFactory.make(presenterCommand).fire();
        }

        @Override
        public void onFailed(Throwable error) {
            LOGGER.error("Could not RunAsync request [" + presenterCommand + "]", error);
        }
    });
}
 
开发者ID:GwtDomino,项目名称:domino,代码行数:16,代码来源:ClientRouter.java

示例6: make

import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
public static ClientApp make(ServerEntryPointContext entryPointContext) {

        clientRouter = new TestClientRouter();
        serverRouter = new TestServerRouter(entryPointContext);
        requestEventProcessor = new RequestEventProcessor();
        eventBus = new TestEventBus(requestEventProcessor);

        presentersRepository = new TestInMemoryPresenterRepository();
        commandsRepository = new InMemoryCommandsRepository();
        viewsRepository = new TestInMemoryViewRepository();
        contributionsRepository = new TestInMemoryContributionsRepository();
        history = new TestDominoHistory();

        return ClientApp.ClientAppBuilder
                .clientRouter(clientRouter)
                .serverRouter(serverRouter)
                .eventsBus(eventBus)
                .requestRepository(commandsRepository)
                .presentersRepository(presentersRepository)
                .viewsRepository(viewsRepository)
                .contributionsRepository(contributionsRepository)
                .requestSendersRepository(new InMemoryRequestRestSendersRepository())
                .history(history)
                .asyncRunner(new TestAsyncRunner())
                .mainExtensionPoint(() -> new MainContext() {
                })
                .dominoOptions(new FakeDominoOptions())
                .build();
    }
 
开发者ID:GwtDomino,项目名称:domino,代码行数:30,代码来源:TestClientAppFactory.java

示例7: onModuleLoad

import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
public void onModuleLoad() {
    LOGGER.info("todo-list Application frontend have been initialized.");
    ClientApp.make().run();

}
 
开发者ID:GwtDomino,项目名称:domino-todolist,代码行数:6,代码来源:AppClientModule.java

示例8: onModuleLoad

import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
public void onModuleLoad() {
    ClientApp.make().run();
    LOGGER.info("Application frontend have been initialized.");
    History.fireCurrentHistoryState();
}
 
开发者ID:GwtDomino,项目名称:domino-event-bus,代码行数:6,代码来源:AppClientModule.java

示例9: apply

import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
public static <E extends ExtensionPoint> void apply(Class<E> extensionPointInterface, E extensionPoint) {
    ClientApp.make().applyContributions(extensionPointInterface, extensionPoint);
}
 
开发者ID:GwtDomino,项目名称:domino,代码行数:4,代码来源:Contributions.java

示例10: loadView

import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
private V loadView() {
    return (V) ClientApp.make().getViewsRepository().getView(getName());
}
 
开发者ID:GwtDomino,项目名称:domino,代码行数:4,代码来源:BaseClientPresenter.java

示例11: runAsync

import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
protected void runAsync(AsyncRunner.AsyncTask asyncTask) {
    ClientApp.make().getAsyncRunner().runAsync(asyncTask);
}
 
开发者ID:GwtDomino,项目名称:domino,代码行数:4,代码来源:BaseClientPresenter.java

示例12: getName

import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
private String getName() {
    return ClientApp.make().getPresentersRepository().getNameFromConcreteName(getConcrete());
}
 
开发者ID:GwtDomino,项目名称:domino,代码行数:4,代码来源:BaseClientPresenter.java

示例13: history

import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
protected DominoHistory history(){
    return ClientApp.make().getHistory();
}
 
开发者ID:GwtDomino,项目名称:domino,代码行数:4,代码来源:BaseClientPresenter.java

示例14: send

import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Override
public final void send(final ServerRequest request) {
    ClientApp.make().getAsyncRunner().runAsync(new RequestAsyncTask(request));
}
 
开发者ID:GwtDomino,项目名称:domino,代码行数:6,代码来源:AbstractRequestAsyncSender.java

示例15: fire

import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
@Override
public void fire() {
    ClientApp.make().getAsyncRunner().runAsync(this::process);
}
 
开发者ID:GwtDomino,项目名称:domino,代码行数:5,代码来源:DesktopSuccessServerEvent.java


注:本文中的com.progressoft.brix.domino.api.client.ClientApp类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。