Skip to content

Proxy Store Operations

These Operations are used with the Proxy Store. They are not enabled by default and will need to be added as additional operations using an Operations Declarations configuration file. An example file which could be used to enable both Proxy Store Operations is given below:

proxyOperationsDeclarations.json
{
    "operations": [
        {
            "operation": "uk.gov.gchq.gaffer.proxystore.operation.GetProxyUrl",
            "handler": {
                "class": "uk.gov.gchq.gaffer.proxystore.operation.handler.GetProxyUrlHandler"
            }
        },
        {
            "operation": "uk.gov.gchq.gaffer.proxystore.operation.GetProxyProperties",
            "handler": {
                "class": "uk.gov.gchq.gaffer.proxystore.operation.handler.GetProxyPropertiesHandler"
            }
        }
    ]
}

GetProxyUrl

Returns the URL of the remote Gaffer REST API which the Proxy Store is configured to forward requests to. Javadoc

Example

final GetProxyUrl getProxyUrl = new GetProxyUrl.Builder()
        .build();
{
"class" : "GetProxyUrl"
}
g.GetProxyUrl()

Results:

"http://gaffer-rest:8080/rest"

Raw result

This operation returns a raw result instead of JSON.

http://gaffer-rest:8080/rest

GetProxyProperties

Returns the proxy specific properties of a Proxy Store. Javadoc

Example

final GetProxyProperties getProxyProperties = new GetProxyProperties.Builder()
        .build();
{
"class" : "GetProxyProperties"
}
g.GetProxyProperties()

Results:

{
    "gaffer.context-root": "/rest",
    "gaffer.host": "gaffer-rest",
    "gaffer.port": "8080",
    "URL_inferred": "http://gaffer-rest:8080/rest",
    "gaffer.read-timeout": "10000",
    "gaffer.connect-timeout": "10000"
}
{
    "gaffer.context-root": "/rest",
    "gaffer.host": "gaffer-rest",
    "gaffer.port": "8080",
    "URL_inferred": "http://gaffer-rest:8080/rest",
    "gaffer.read-timeout": "10000",
    "gaffer.connect-timeout": "10000"
}