v5 middleware support
This commit is contained in:
Родитель
852b01645e
Коммит
e5eeca28a2
|
@ -6,8 +6,6 @@
|
|||
|
||||
package com.microsoft.azure.functions;
|
||||
|
||||
import java.lang.reflect.Parameter;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
|
@ -52,19 +50,5 @@ public interface ExecutionContext {
|
|||
default RetryContext getRetryContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
Map<String, Parameter> getParameterMap();
|
||||
|
||||
Map<String, String> getParameterPayloadMap();
|
||||
|
||||
void setMiddlewareInput(String key, Object value);
|
||||
|
||||
Object getReturnValue();
|
||||
|
||||
void setMiddlewareOutput(Object value);
|
||||
|
||||
void setFunctionInstance(Object functionInstance);
|
||||
|
||||
Class<?> getContainingClass();
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
*/
|
||||
package com.microsoft.azure.functions.middleware;
|
||||
|
||||
import com.microsoft.azure.functions.ExecutionContext;
|
||||
|
||||
public interface FunctionWorkerChain {
|
||||
void doNext(ExecutionContext context) throws Exception;
|
||||
void doNext(MiddlewareExecutionContext context) throws Exception;
|
||||
}
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
*/
|
||||
package com.microsoft.azure.functions.middleware;
|
||||
|
||||
import com.microsoft.azure.functions.ExecutionContext;
|
||||
|
||||
public interface FunctionWorkerMiddleware {
|
||||
void invoke(ExecutionContext context, FunctionWorkerChain next) throws Exception;
|
||||
void invoke(MiddlewareExecutionContext context, FunctionWorkerChain next) throws Exception;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
/**
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*/
|
||||
package com.microsoft.azure.functions.middleware;
|
||||
|
||||
import com.microsoft.azure.functions.ExecutionContext;
|
||||
import java.lang.reflect.Parameter;
|
||||
import java.util.Map;
|
||||
|
||||
//TODO: think about using aggregation
|
||||
public interface MiddlewareExecutionContext extends ExecutionContext {
|
||||
|
||||
Object getReturnValue();
|
||||
|
||||
void setMiddlewareOutput(Object value);
|
||||
|
||||
void setFunctionInstance(Object functionInstance);
|
||||
|
||||
Class<?> getContainingClass();
|
||||
|
||||
Map<String, Parameter> getParameterMap();
|
||||
|
||||
Object getParameterPayloadByName(String name);
|
||||
|
||||
void updateParameterPayloadByName(String name, Object payload);
|
||||
}
|
Загрузка…
Ссылка в новой задаче