本文整理汇总了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();
}
示例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();
}
});
}
示例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();
}
示例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");
}
});
}
示例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);
}
});
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
示例10: loadView
import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
private V loadView() {
return (V) ClientApp.make().getViewsRepository().getView(getName());
}
示例11: runAsync
import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
protected void runAsync(AsyncRunner.AsyncTask asyncTask) {
ClientApp.make().getAsyncRunner().runAsync(asyncTask);
}
示例12: getName
import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
private String getName() {
return ClientApp.make().getPresentersRepository().getNameFromConcreteName(getConcrete());
}
示例13: history
import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
protected DominoHistory history(){
return ClientApp.make().getHistory();
}
示例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));
}
示例15: fire
import com.progressoft.brix.domino.api.client.ClientApp; //导入依赖的package包/类
@Override
public void fire() {
ClientApp.make().getAsyncRunner().runAsync(this::process);
}