use of org.bimserver.client.protocolbuffers.ProtocolBuffersBimServerClientFactory in project BIMserver by opensourceBIM.
the class LocalDevSetup method setupProtocolBuffers.
public static final BimServerClientInterface setupProtocolBuffers(String address) {
Path home = Paths.get("home");
Path tmp = home.resolve("tmp");
MetaDataManager metaDataManager = new MetaDataManager(tmp);
try (BimServerClientFactory factory = new ProtocolBuffersBimServerClientFactory(address, 8000, 8000, null, metaDataManager, new SServicesMap())) {
PluginManager pluginManager = LocalDevPluginLoader.createPluginManager(home);
pluginManager.setMetaDataManager(metaDataManager);
return factory.create(new UsernamePasswordAuthenticationInfo("admin@bimserver.org", "admin"));
} catch (PluginException e) {
LOGGER.error("", e);
} catch (ServiceException e) {
LOGGER.error("", e);
} catch (ChannelConnectionException e) {
LOGGER.error("", e);
} catch (BimServerClientException e) {
LOGGER.error("", e);
} catch (Exception e) {
LOGGER.error("", e);
}
return null;
}
Aggregations