forked from Azure/azure-functions-java-worker
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New preview introduces new annotations (Azure#87)
* Format xml with syntax highlighting in readme.md * A few improvements to the JavaDoc for Azure Functions / Java * Further updates to JavaDocs for Azure Functions Java API. Not complete, but a good starting point. * Updates to javadoc based on review feedback * Small tweaks based on PR review * Update readme.md file to remove shade advice Shade advice is no longer recommended practice, so removing from the readme.md file before it leads to additional confusion. * Update README.md Add details about the funcitonLib property requirement. * Increase both core and worker version since both of them will be updated. * Remove the unnecessary variable definition. * change documentdb to cosmosdb * add cosmosdb trigger * add cosmosDBTrigger binding defination * add eventgrid support * Add convenient method of createResponse with empty body. * Add development documentation on how to build and debug. * Add javadoc generation instruction. * Add unit test framework to the project. * Rename package names of testing categories. * Add GRPC e2e test framework as well as test cases.
- Loading branch information
Junyi Yi
authored
Apr 19, 2018
1 parent
cfcdbcb
commit 15d6c93
Showing
57 changed files
with
1,003 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...java-core/src/main/java/com/microsoft/azure/serverless/functions/HttpResponseMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,51 @@ | ||
package com.microsoft.azure.serverless.functions; | ||
|
||
/** | ||
* An HttpResponseMessage instance is returned by Azure Functions methods that are triggered by an | ||
* {@link com.microsoft.azure.serverless.functions.annotation.HttpTrigger}. | ||
* | ||
* @see com.microsoft.azure.serverless.functions.annotation.HttpTrigger | ||
* @see HttpRequestMessage | ||
* @param <T> The type of the body, as determined by the return type specified on the function itself. | ||
* @since 1.0.0 | ||
*/ | ||
public interface HttpResponseMessage<T> { | ||
|
||
/** | ||
* Returns the status code set on the HttpResponseMessage instance. | ||
* @return the status code set on the HttpResponseMessage instance. | ||
*/ | ||
int getStatus(); | ||
|
||
/** | ||
* Sets the status code on the HttpResponseMessage instance. | ||
* @param status An HTTP status code representing the outcome of the HTTP request. | ||
*/ | ||
void setStatus(int status); | ||
|
||
/** | ||
* Adds a (key,value) header to the response. | ||
* @param key The key of the header value. | ||
* @param value The value of the header value. | ||
*/ | ||
void addHeader(String key, String value); | ||
|
||
/** | ||
* Returns a header value for the given key. | ||
* @param key The key for which the header value is sought. | ||
* @return Returns the value if the key has previously been added, or null if it has not. | ||
*/ | ||
String getHeader(String key); | ||
|
||
/** | ||
* Returns the body of the HTTP response. | ||
* @return the body of the HTTP response. | ||
*/ | ||
T getBody(); | ||
|
||
/** | ||
* Sets the body of the HTTP response. | ||
* @param body The body of the HTTP response | ||
*/ | ||
void setBody(T body); | ||
} |
4 changes: 4 additions & 0 deletions
4
...tions-java-core/src/main/java/com/microsoft/azure/serverless/functions/OutputBinding.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.