Interface Context


  • public interface Context
    An interface for event function context.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      BindingEvent getBindingEvent()
      getBindingEvent returns the binding event.
      io.cloudevents.CloudEvent getCloudEvent()
      getCloudEvent returns the cloud Event.
      io.dapr.client.DaprClient getDaprClient()
      getDaprClient return a dapr client, so that use user can call the dapr API directly.
      java.lang.String getHttpPattern()
      getHttpPattern returns the path of the server listening for http function.
      HttpRequest getHttpRequest()
      getHttpRequest returns the Http request.
      HttpResponse getHttpResponse()
      getHttpResponse returns the Http response.
      java.lang.String getName()
      getName returns the function's name.
      Out getOut()
      GetOut returns the returned value of function.
      java.util.Map<java.lang.String,​Component> getOutputs()
      getOutputs returns the Outputs of function.
      java.util.Map<java.lang.String,​Component> getStates()
      getStates returns the states of function.
      TopicEvent getTopicEvent()
      getTopicEvent returns the topic event.
      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.
    • 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 name
        data - Data String
        Returns:
        Error
      • 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
      • getOut

        Out getOut()
        GetOut returns the returned value of function.
        Returns:
        Out
      • getHttpPattern

        java.lang.String getHttpPattern()
        getHttpPattern returns the path of the server listening for http function.
        Returns:
        String
      • getOutputs

        java.util.Map<java.lang.String,​ComponentgetOutputs()
        getOutputs returns the Outputs of function.
        Returns:
        Outputs
      • getStates

        java.util.Map<java.lang.String,​ComponentgetStates()
        getStates returns the states of function.
        Returns:
        states
      • getDaprClient

        io.dapr.client.DaprClient getDaprClient()
        getDaprClient return a dapr client, so that use user can call the dapr API directly. Be carefully, the dapr client maybe null;
        Returns:
        Dapr client