use of de.catma.hazelcast.HazelCastService in project catma by forTEXT.
the class CatmaApplication method init.
@Override
protected void init(VaadinRequest request) {
eventBus = new EventBus();
initService = new Vaadin8InitializationService();
loginservice = new GitlabLoginService(new IRemoteGitManagerFactory() {
@Override
public IRemoteGitManagerRestricted createFromUsernameAndPassword(String username, String password) throws IOException {
return new GitlabManagerRestricted(eventBus, initService.acquireBackgroundService(), username, password);
}
@Override
public IRemoteGitManagerRestricted createFromImpersonationToken(String userImpersonationToken) throws IOException {
return new GitlabManagerRestricted(eventBus, initService.acquireBackgroundService(), userImpersonationToken);
}
});
hazelCastService = new HazelCastService();
this.eventBus.register(this);
try {
sqliteService = new SqliteService();
} catch (Exception e) {
showAndLogError("error initialising sqlite service", e);
}
logger.info("Session: " + request.getWrappedSession().getId());
storeParameters(request.getParameterMap());
Page.getCurrent().setTitle("CATMA " + Version.LATEST);
try {
Component component = initService.newEntryPage(eventBus, loginservice, hazelCastService, sqliteService);
setContent(component);
} catch (IOException e) {
showAndLogError("error creating landing page", e);
}
eventBus.post(new RouteToDashboardEvent());
// A fresh UI and session doesn't have a request handler registered yet.
// we need to verify tokens here too.
handleRequestToken(request);
handleRequestOauth(request);
}
use of de.catma.hazelcast.HazelCastService in project catma by forTEXT.
the class TaggerView method addCommentMessageListener.
private void addCommentMessageListener() {
try {
removeCommentMessageListener();
if (this.sourceDocument != null) {
HazelCastService hazelcastService = ((CatmaApplication) UI.getCurrent()).getHazelCastService();
this.commentTopic = hazelcastService.getHazelcastClient().getTopic(HazelcastConfiguration.TopicName.COMMENT + "_" + this.sourceDocument.getUuid());
this.commentMessageListenerRegId = this.commentTopic.addMessageListener(this.commentMessageListener);
}
} catch (Exception e) {
logger.log(Level.WARNING, "error registering for comment messages", e);
}
}
Aggregations