All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.azure.functions.annotation.CustomBinding Maven / Gradle / Ivy

Go to download

This package contains all Java interfaces and annotations to interact with Microsoft Azure functions runtime.

The newest version!
/**
 * 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.annotation;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * 

* Place this on a parameter to define a custom binding

* *
    *
  • Any native Java types such as int, String, byte[]
  • *
  • Nullable values using Optional<T>
  • *
  • Any POJO type
  • *
* *

The following example shows a Java function that uses a customBinding:

* *
{@literal @}FunctionName("CustomBindingTriggerSample")
 * public void logCustomTriggerInput(
 *    {@literal @}CustomBinding(direction = "in", name = "inputParameterName", type = "customBindingTrigger") String customTriggerInput
 *    final ExecutionContext context
 * ) {
 *     context.getLogger().info(customTriggerInput);
 * }
* * @since 1.0.0 */ @Retention(RetentionPolicy.RUNTIME) public @interface CustomBinding { /** * The variable name used in function.json. * @return The variable name used in function.json. */ String name(); /** * The variable name used in function.json to specify the type of the binding. * @return The type of the binding. */ String type(); /** * The variable name used in function.json to specify the direction of the binding: in or out * @return The direction of the biding. */ String direction(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy