use of com.symphony.api.bindings.ApiWrapper in project spring-bot by finos.
the class AbstractGenericInstanceFactory method buildApiWrappers.
/**
* Override this method to change the wrappers used. By default, this just returns the {@link StreamIDHelp}
* wrapper, which you probably want to keep.
*/
protected List<ApiWrapper> buildApiWrappers(PodProperties pp, ID id, EndpointProperties ep) {
List<ApiWrapper> out = new ArrayList<>();
out.add(new StreamIDHelp());
return out;
}
use of com.symphony.api.bindings.ApiWrapper in project spring-bot by finos.
the class AbstractGenericInstanceFactory method createApiBuilder.
/**
* Override this method to configure your own ApiBuilder implementation.
*/
protected ConfigurableApiBuilder createApiBuilder(PodProperties pp, EndpointProperties ep, ID id, TrustManager[] trustManagers, String apiName, ApiWrapper... extra) throws Exception {
if (ep == null) {
LOG.warn("symphony.apis[{}].{} not set: could cause NPE when doing get{}Api()", pp.getId(), apiName.toLowerCase(), StringUtils.capitalize(apiName));
return null;
}
List<ApiWrapper> wrappers = buildApiWrappers(pp, id, ep);
Arrays.stream(extra).forEach(w -> wrappers.add(w));
ApiWrapper[] wrapperArray = wrappers.stream().toArray(s -> new ApiWrapper[s]);
ConfigurableApiBuilder ab = apiBuilderFactory.getObject();
ep.configure(ab, wrapperArray, getIdentity(id), trustManagers);
return ab;
}
use of com.symphony.api.bindings.ApiWrapper in project spring-bot by finos.
the class DefaultOboInstanceFactory method buildApiWrappers.
@Override
protected List<ApiWrapper> buildApiWrappers(PodProperties pp, OboIdentity id, EndpointProperties ep) {
List<ApiWrapper> out = super.buildApiWrappers(pp, id, ep);
out.add(new MetricsApiWrapper(mr, pp, id.getTheApp().getCommonName() + "/" + id.getOboUserId(), ep.getUrl()));
return out;
}
Aggregations