Package dev.openfunction.functions
Interface Context
-
public interface Context
An interface for event function context.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BindingEventgetBindingEvent()getBindingEvent returns the binding event.io.cloudevents.CloudEventgetCloudEvent()getCloudEvent returns the cloud Event.java.lang.StringgetHttpPattern()getHttpPattern returns the path of the server listening for http function.HttpRequestgetHttpRequest()getHttpRequest returns the Http request.HttpResponsegetHttpResponse()getHttpResponse returns the Http response.java.util.Map<java.lang.String,Component>getInputs()getInputs returns the Inputs of function.java.lang.StringgetMode()getMode returns the operating environment mode of the function.java.lang.StringgetName()getName returns the function's name.OutgetOut()GetOut returns the returned value of function.java.util.Map<java.lang.String,Component>getOutputs()getOutputs returns the Outputs of function.java.lang.StringgetPodName()getPodName returns the name of the pod the function is running on.java.lang.StringgetPodNamespace()getPodNamespace returns the namespace of the pod the function is running on.java.util.Map<java.lang.String,Plugin>getPostPlugins()java.util.Map<java.lang.String,Plugin>getPrePlugins()java.lang.StringgetRuntime()getRuntime returns the Runtime.TopicEventgetTopicEvent()getTopicEvent returns the topic event.java.lang.Errorsend(java.lang.String outputName, java.lang.String data)send provides the ability to allow the user to send data to a specified output target.
-
-
-
Method Detail
-
send
java.lang.Error send(java.lang.String outputName, java.lang.String data)
send provides the ability to allow the user to send data to a specified output target.- Parameters:
outputName- output target namedata- Data String- Returns:
- Error
-
getHttpRequest
HttpRequest getHttpRequest()
getHttpRequest returns the Http request.- Returns:
- HttpRequest
-
getHttpResponse
HttpResponse getHttpResponse()
getHttpResponse returns the Http response.- Returns:
- HttpResponse
-
getBindingEvent
BindingEvent getBindingEvent()
getBindingEvent returns the binding event.- Returns:
- BindingEvent GetBindingEvent();
-
getTopicEvent
TopicEvent getTopicEvent()
getTopicEvent returns the topic event.- Returns:
- TopicEvent
-
getCloudEvent
io.cloudevents.CloudEvent getCloudEvent()
getCloudEvent returns the cloud Event.- Returns:
- CloudEvent
-
getName
java.lang.String getName()
getName returns the function's name.- Returns:
- Function Name
-
getMode
java.lang.String getMode()
getMode returns the operating environment mode of the function.- Returns:
- Mode
-
getRuntime
java.lang.String getRuntime()
getRuntime returns the Runtime.- Returns:
- String
-
getHttpPattern
java.lang.String getHttpPattern()
getHttpPattern returns the path of the server listening for http function.- Returns:
- String
-
getInputs
java.util.Map<java.lang.String,Component> getInputs()
getInputs returns the Inputs of function.- Returns:
- Inputs
-
getOutputs
java.util.Map<java.lang.String,Component> getOutputs()
getOutputs returns the Outputs of function.- Returns:
- Outputs
-
getPodName
java.lang.String getPodName()
getPodName returns the name of the pod the function is running on.- Returns:
- name of pod
-
getPodNamespace
java.lang.String getPodNamespace()
getPodNamespace returns the namespace of the pod the function is running on.- Returns:
- namespace of pod
-
getPrePlugins
java.util.Map<java.lang.String,Plugin> getPrePlugins()
- Returns:
- pre plugins
-
getPostPlugins
java.util.Map<java.lang.String,Plugin> getPostPlugins()
- Returns:
- post plugin
-
-