本文整理了Java中io.apiman.gateway.engine.beans.Api.getEndpoint()
方法的一些代码示例,展示了Api.getEndpoint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Api.getEndpoint()
方法的具体详情如下:
包路径:io.apiman.gateway.engine.beans.Api
类名称:Api
方法名:getEndpoint
暂无
代码示例来源:origin: apiman/apiman
private URI parseApiEndpoint(Api api) {
try {
return new URI(api.getEndpoint());
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: apiman/apiman
/**
* Response API property replacements
*/
protected void resolvePropertyReplacements(Api api) {
if (api == null) {
return;
}
String endpoint = api.getEndpoint();
endpoint = resolveProperties(endpoint);
api.setEndpoint(endpoint);
Map<String, String> properties = api.getEndpointProperties();
for (Entry<String, String> entry : properties.entrySet()) {
String value = entry.getValue();
value = resolveProperties(value);
entry.setValue(value);
}
resolvePropertyReplacements(api.getApiPolicies());
}
代码示例来源:origin: io.apiman/apiman-gateway-engine-core
/**
* Response API property replacements
*/
protected void resolvePropertyReplacements(Api api) {
if (api == null) {
return;
}
String endpoint = api.getEndpoint();
endpoint = resolveProperties(endpoint);
api.setEndpoint(endpoint);
Map<String, String> properties = api.getEndpointProperties();
for (Entry<String, String> entry : properties.entrySet()) {
String value = entry.getValue();
value = resolveProperties(value);
entry.setValue(value);
}
resolvePropertyReplacements(api.getApiPolicies());
}
代码示例来源:origin: apiman/apiman
/**
* Constructor.
* @param api
* @param request
* @param handler
*/
public PolicyTesterApiConnection(Api api, ApiRequest request,
IAsyncResultHandler<IApiConnectionResponse> handler) {
this.request = request;
this.handler = handler;
this.output = null;
this.backEndApi = createBackEndApi(api.getEndpoint());
}
代码示例来源:origin: apiman/apiman
String endpoint = ApimanPathUtils.join(api.getEndpoint(), request.getDestination());
代码示例来源:origin: io.apiman/apiman-test-policies
/**
* Constructor.
* @param api
* @param request
* @param handler
*/
public PolicyTesterApiConnection(Api api, ApiRequest request,
IAsyncResultHandler<IApiConnectionResponse> handler) {
this.request = request;
this.handler = handler;
this.output = null;
this.backEndApi = createBackEndApi(api.getEndpoint());
}
代码示例来源:origin: io.apiman/apiman-gateway-platforms-servlet
String endpoint = ApimanPathUtils.join(api.getEndpoint(), request.getDestination());
代码示例来源:origin: apiman/apiman
@Override
public IApiConnector createConnector(ApiRequest req, Api api, RequiredAuthType authType, boolean hasDataPolicy, IConnectorConfig connectorConfig) {
return (request, resultHandler) -> {
// Apply options from config as our base case
ApimanHttpConnectorOptions httpOptions = new ApimanHttpConnectorOptions(config)
.setHasDataPolicy(hasDataPolicy)
.setRequiredAuthType(authType)
.setTlsOptions(tlsOptions)
.setUri(parseApiEndpoint(api))
.setSsl(api.getEndpoint().toLowerCase().startsWith("https")); //$NON-NLS-1$
// If API has endpoint properties indicating timeouts, then override config.
setAttributesFromApiEndpointProperties(api, httpOptions);
// Get from cache
HttpClient client = clientFromCache(httpOptions);
return new HttpConnector(vertx, client, request, api, httpOptions, connectorConfig, resultHandler).connect();
};
}
代码示例来源:origin: apiman/apiman
new ApimanHttpConnectorOptions()
.setHasDataPolicy(true)
.setUri(URI.create(api.getEndpoint())),
new VertxConnectorConfig(),
ignored -> {
内容来源于网络,如有侵权,请联系作者删除!