use of org.bimserver.shared.meta.SServicesMap in project BIMserver by opensourceBIM.
the class InterfaceList method createSServicesMap.
public static SServicesMap createSServicesMap() {
SServicesMap servicesMap = new SServicesMap();
CodeFetcher sourceCodeFetcher = new CodeFetcher();
SService serviceInterface = new SServiceInterfaceService(servicesMap, sourceCodeFetcher, ServiceInterface.class);
servicesMap.add(serviceInterface);
for (Class<? extends PublicInterface> clazz : getInterfaces()) {
if (clazz != ServiceInterface.class) {
servicesMap.add(new SService(servicesMap, sourceCodeFetcher, clazz));
}
}
servicesMap.initialize();
return servicesMap;
}
use of org.bimserver.shared.meta.SServicesMap 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