Class GatewayClient
- java.lang.Object
-
- io.apiman.manager.api.gateway.rest.GatewayClient
-
public class GatewayClient extends Object
A REST client for accessing the Gateway API.- Author:
- eric.wittmann@redhat.com
-
-
Constructor Summary
Constructors Constructor Description GatewayClient(String endpoint, org.apache.http.impl.client.CloseableHttpClient httpClient)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ApiEndpointgetApiEndpoint(String organizationId, String apiId, String version)GatewayEndpointgetGatewayEndpoint()SystemStatusgetStatus()protected static StackTraceElement[]parseStackTrace(String stacktrace)Parses a stack trace from the given string.IPolicyProbeResponseprobePolicy(String orgId, String apiId, String apiVersion, int idx)IPolicyProbeResponseprobePolicy(String orgId, String apiId, String apiVersion, int idx, String apiKey, String rawPayload)voidpublish(Api api)voidregister(Client client)voidretire(String organizationId, String apiId, String version)voidunregister(String organizationId, String clientId, String version)
-
-
-
Constructor Detail
-
GatewayClient
public GatewayClient(String endpoint, org.apache.http.impl.client.CloseableHttpClient httpClient)
Constructor.- Parameters:
endpoint- the endpointhttpClient- the http client
-
-
Method Detail
-
probePolicy
public IPolicyProbeResponse probePolicy(String orgId, String apiId, String apiVersion, int idx) throws GatewayAuthenticationException
- Throws:
GatewayAuthenticationException
-
probePolicy
public IPolicyProbeResponse probePolicy(String orgId, String apiId, String apiVersion, int idx, String apiKey, String rawPayload) throws GatewayAuthenticationException
- Throws:
GatewayAuthenticationException
-
getStatus
public SystemStatus getStatus() throws GatewayAuthenticationException
- Throws:
GatewayAuthenticationException- See Also:
ISystemResource.getStatus()
-
getGatewayEndpoint
public GatewayEndpoint getGatewayEndpoint() throws GatewayAuthenticationException
- Throws:
GatewayAuthenticationException- See Also:
ISystemResource.getEndpoint()
-
getApiEndpoint
public ApiEndpoint getApiEndpoint(String organizationId, String apiId, String version) throws GatewayAuthenticationException
-
register
public void register(Client client) throws RegistrationException, GatewayAuthenticationException
-
unregister
public void unregister(String organizationId, String clientId, String version) throws RegistrationException, GatewayAuthenticationException
-
publish
public void publish(Api api) throws PublishingException, GatewayAuthenticationException
-
retire
public void retire(String organizationId, String apiId, String version) throws RegistrationException, GatewayAuthenticationException
-
parseStackTrace
protected static StackTraceElement[] parseStackTrace(String stacktrace)
Parses a stack trace from the given string.- Parameters:
stacktrace-
-
-