azure-docs-sdk-java/docs-ref-autogen/com.microsoft.azure.functio...

88 строки
5.9 KiB
YAML

### YamlMime:JavaType
uid: "com.microsoft.azure.functions.annotation.EventHubTrigger"
fullName: "com.microsoft.azure.functions.annotation.EventHubTrigger"
name: "EventHubTrigger"
nameWithType: "EventHubTrigger"
summary: "Place this on a parameter whose value would come from event hub, and causing the method to run when a new event is arrived."
syntax: "public interface **EventHubTrigger**</br> implements <xref href=\"java.lang.annotation.Annotation?alt=java.lang.annotation.Annotation&text=Annotation\" data-throw-if-not-resolved=\"False\" />"
methods:
- uid: "com.microsoft.azure.functions.annotation.EventHubTrigger.cardinality()"
fullName: "com.microsoft.azure.functions.annotation.EventHubTrigger.cardinality()"
name: "cardinality()"
nameWithType: "EventHubTrigger.cardinality()"
summary: "Cardinality of the trigger input."
modifiers:
- "abstract"
syntax: "public abstract Cardinality cardinality()"
desc: "Cardinality of the trigger input. Choose 'One' if the input is a single message or 'Many' if the input is an array of messages. 'Many' is the default if unspecified"
returns:
description: "An <xref uid=\"com.microsoft.azure.functions.annotation.Cardinality\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Cardinality\"></xref> value representing the Cardinality"
type: "<xref href=\"com.microsoft.azure.functions.annotation.Cardinality?alt=com.microsoft.azure.functions.annotation.Cardinality&text=Cardinality\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.functions.annotation.EventHubTrigger.connection()"
fullName: "com.microsoft.azure.functions.annotation.EventHubTrigger.connection()"
name: "connection()"
nameWithType: "EventHubTrigger.connection()"
summary: "Defines the app setting name that contains the Azure Eventhub connection string."
modifiers:
- "abstract"
syntax: "public abstract String connection()"
desc: "Defines the app setting name that contains the Azure Eventhub connection string."
returns:
description: "The app setting name of the connection string."
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.functions.annotation.EventHubTrigger.consumerGroup()"
fullName: "com.microsoft.azure.functions.annotation.EventHubTrigger.consumerGroup()"
name: "consumerGroup()"
nameWithType: "EventHubTrigger.consumerGroup()"
summary: "Defines the consumer group of the event hub to which to bind."
modifiers:
- "abstract"
syntax: "public abstract String consumerGroup()"
desc: "Defines the consumer group of the event hub to which to bind."
returns:
description: "The event hub consumer group string."
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.functions.annotation.EventHubTrigger.dataType()"
fullName: "com.microsoft.azure.functions.annotation.EventHubTrigger.dataType()"
name: "dataType()"
nameWithType: "EventHubTrigger.dataType()"
summary: "Defines how Functions runtime should treat the parameter value."
modifiers:
- "abstract"
syntax: "public abstract String dataType()"
desc: "Defines how Functions runtime should treat the parameter value. Possible values are:\n\n * \"\": get the value as a string, and try to deserialize to actual parameter type like POJO\n * string: always get the value as a string\n * binary: get the value as a binary data, and try to deserialize to actual parameter type byte\\[\\]"
returns:
description: "The dataType which will be used by the Functions runtime."
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.functions.annotation.EventHubTrigger.eventHubName()"
fullName: "com.microsoft.azure.functions.annotation.EventHubTrigger.eventHubName()"
name: "eventHubName()"
nameWithType: "EventHubTrigger.eventHubName()"
summary: "Defines the name of the event hub to which to bind."
modifiers:
- "abstract"
syntax: "public abstract String eventHubName()"
desc: "Defines the name of the event hub to which to bind."
returns:
description: "The event hub name string."
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.functions.annotation.EventHubTrigger.name()"
fullName: "com.microsoft.azure.functions.annotation.EventHubTrigger.name()"
name: "name()"
nameWithType: "EventHubTrigger.name()"
summary: "The variable name used in function.<wbr>json."
modifiers:
- "abstract"
syntax: "public abstract String name()"
desc: "The variable name used in function.json."
returns:
description: "The variable name used in function.json."
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
type: "interface"
desc: "Place this on a parameter whose value would come from event hub, and causing the method to run when a new event is arrived. The parameter type can be one of the following:\n\n * Any native Java types such as int, String, byte\\[\\]\n * Nullable values using Optional<T>\n * Any POJO type\n\nThe following example shows a Java function that logs the message body of the event hub trigger:\n\n```java\n@FunctionName(\"eventHubMonitor\")\n public void logEventHubMessage(\n @EventHubTrigger(name = \"event\", \n eventHubName = \"samples-workitems\", \n connection = \"AzureEventHubConnection\") String message,\n final ExecutionContext context\n ) {\n context.getLogger().info(\"Event hub message received: \" + message);\n }\n```"
implements:
- "<xref href=\"java.lang.annotation.Annotation?alt=java.lang.annotation.Annotation&text=Annotation\" data-throw-if-not-resolved=\"False\" />"
metadata: {}
package: "com.microsoft.azure.functions.annotation"
artifact: com.microsoft.azure.functions:azure-functions-java-library:1.3.1