Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java support #111

Merged
merged 7 commits into from
Nov 13, 2020
Merged

Java support #111

merged 7 commits into from
Nov 13, 2020

Conversation

yojagad
Copy link
Contributor

@yojagad yojagad commented Nov 9, 2020

Part of work for #60

@jeffhollan / @fabiocav Following the signalr way of adding annotations for an extension (https://github.com/Azure/azure-functions-signalrservice-extension/tree/master/binding-library/java)

cc: @cachai2

Below is an example java function

/**
 * Azure Functions with HTTP Trigger.
 */
public class Function {
    @FunctionName("RabbitMQExample")
    public void run(
            @RabbitMQTrigger(
                connectionStringSetting = "ConnectionString",
                queueName = "TestQueue"
            ) String input,
            @RabbitMQOutput(
                connectionStringSetting = "ConnectionString",
                queueName = "hello"
            ) OutputBinding<String> output,
            final ExecutionContext context) {
        context.getLogger().info("Java HTTP trigger processed a request." + input);
        output.setValue(input);
    }
}

@fabiocav
Copy link
Member

fabiocav commented Nov 9, 2020

Thanks! Would be good to get @pragnagopa 's feedback here, as I know this differs from the initial proposed implementation

@pragnagopa
Copy link
Member

@jeffhollan / @fabiocav - I recommend following similar approach as signalr and create Java annotations in this repo.

This allows keeping annotations and c# attributes in sync and can be released independently of azure-function-java-library

@yojagad yojagad force-pushed the yojagad/JavaAnnotations branch from 04fe338 to d810c84 Compare November 9, 2020 22:54
Copy link
Member

@pragnagopa pragnagopa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added minor comments

  • Open issue to add integration test that verifies function.json generated by mvn
  • Update PR description with same java function that uses this annotation. Later can be re-used in the documentation

@yojagad
Copy link
Contributor Author

yojagad commented Nov 10, 2020

@pragnagopa Added issue here #112

Copy link
Member

@pragnagopa pragnagopa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added few more nits . Thanks

Copy link
Member

@pragnagopa pragnagopa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Nit, fix format before merging.

@yojagad yojagad merged commit aa9c18a into dev Nov 13, 2020
@yojagad yojagad deleted the yojagad/JavaAnnotations branch November 13, 2020 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants