public class DelegateHandler
extends java.lang.Object
implements org.swisspush.gateleen.core.refresh.Refreshable, org.swisspush.gateleen.core.logging.LoggableResource
definition within the specified
delegate.PUT /gateleen/server/delegate/v1/delegates/user-zip-copy/definition
{
"methods": [ "PUT", "DELETE" ],
"pattern": "([^/]*)/(.*)",
"requests": [
{
"headers" : [],
"uri": "/gateleen/server/copy",
"method": "POST",
"payload": {
"source": "/gateleen/$1?expand=100&zip=true",
"destination": "/gateleen/zips/users/$1.zip"
}
}
]
}
To trigger an execution, it suffice to perform a PUT request on the virtual collection execution within
the specified delegate.PUT /gateleen/server/delegate/v1/delegates/user-zip-copy/execution/<...>| Constructor and Description |
|---|
DelegateHandler(io.vertx.core.Vertx vertx,
io.vertx.core.http.HttpClient selfClient,
org.swisspush.gateleen.core.storage.ResourceStorage storage,
org.swisspush.gateleen.monitoring.MonitoringHandler monitoringHandler,
java.lang.String delegatesUri,
java.util.Map<java.lang.String,java.lang.Object> properties)
Creates a new instance of the DelegateHandler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
enableResourceLogging(boolean resourceLoggingEnabled) |
protected java.lang.String |
getDelegateName(java.lang.String uri)
Tries to extract the name of the delegate out
of the incoming uri.
|
boolean |
handle(io.vertx.core.http.HttpServerRequest request)
Checks if the DelegateHandler is responsible for this request.
|
void |
init()
This method initializes the Handler.
|
void |
refresh() |
public DelegateHandler(io.vertx.core.Vertx vertx,
io.vertx.core.http.HttpClient selfClient,
org.swisspush.gateleen.core.storage.ResourceStorage storage,
org.swisspush.gateleen.monitoring.MonitoringHandler monitoringHandler,
java.lang.String delegatesUri,
java.util.Map<java.lang.String,java.lang.Object> properties)
vertx - vertxselfClient - selfClientstorage - storagemonitoringHandler - monitoringHandlerdelegatesUri - delegate rootproperties - propertiespublic void init()
protected java.lang.String getDelegateName(java.lang.String uri)
uri - original request uripublic boolean handle(io.vertx.core.http.HttpServerRequest request)
request - original requestpublic void refresh()
refresh in interface org.swisspush.gateleen.core.refresh.Refreshablepublic void enableResourceLogging(boolean resourceLoggingEnabled)
enableResourceLogging in interface org.swisspush.gateleen.core.logging.LoggableResource