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.
Add a more sophisicated binding resolving architecture and algorithm (A…
…zure#13) * Re-format some of the the source code. * Adopt the new architecture of binding data resolution. * Update the annotation names and name resolution algorithm.
- Loading branch information
Junyi Yi
authored
Sep 16, 2017
1 parent
406df1d
commit 1750ea5
Showing
40 changed files
with
1,001 additions
and
650 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
24 changes: 5 additions & 19 deletions
24
...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,22 +1,8 @@ | ||
package com.microsoft.azure.serverless.functions; | ||
|
||
public final class HttpResponseMessage { | ||
public HttpResponseMessage(int status) { | ||
this(status, null); | ||
} | ||
|
||
public HttpResponseMessage(Object body) { | ||
this(200, body); | ||
} | ||
|
||
public HttpResponseMessage(int status, Object body) { | ||
this.status = status; | ||
this.body = (body != null ? body : ""); | ||
} | ||
|
||
public Integer getStatus() { return this.status; } | ||
public Object getBody() { return this.body; } | ||
|
||
private int status; | ||
private Object body; | ||
public interface HttpResponseMessage { | ||
int getStatus(); | ||
void setStatus(int status); | ||
Object getBody(); | ||
void setBody(Object body); | ||
} |
6 changes: 6 additions & 0 deletions
6
...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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.microsoft.azure.serverless.functions; | ||
|
||
public interface OutputBinding<T> { | ||
T getValue(); | ||
void setValue(T value); | ||
} |
15 changes: 0 additions & 15 deletions
15
...ons-java-core/src/main/java/com/microsoft/azure/serverless/functions/OutputParameter.java
This file was deleted.
Oops, something went wrong.
24 changes: 12 additions & 12 deletions
24
...-core/src/main/java/com/microsoft/azure/serverless/functions/annotation/AccessRights.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,12 +1,12 @@ | ||
/** | ||
* 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.serverless.functions.annotation; | ||
|
||
public enum AccessRights { | ||
MANAGE, | ||
LISTEN | ||
} | ||
/** | ||
* 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.serverless.functions.annotation; | ||
|
||
public enum AccessRights { | ||
MANAGE, | ||
LISTEN | ||
} |
26 changes: 13 additions & 13 deletions
26
...src/main/java/com/microsoft/azure/serverless/functions/annotation/AuthorizationLevel.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,13 +1,13 @@ | ||
/** | ||
* 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.serverless.functions.annotation; | ||
|
||
public enum AuthorizationLevel { | ||
ANONYMOUS, | ||
FUNCTION, | ||
ADMIN | ||
} | ||
/** | ||
* 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.serverless.functions.annotation; | ||
|
||
public enum AuthorizationLevel { | ||
ANONYMOUS, | ||
FUNCTION, | ||
ADMIN | ||
} |
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
18 changes: 18 additions & 0 deletions
18
azure-functions-java-sample/src/main/functions/echo/function.json
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"scriptFile": "../../../../target/azure-functions-java-sample-1.0-SNAPSHOT.jar", | ||
"entryPoint": "com.microsoft.serverless.Miscellany.echo", | ||
"bindings": [ | ||
{ | ||
"type": "httpTrigger", | ||
"name": "req", | ||
"direction": "in", | ||
"authLevel": "anonymous", | ||
"methods": [ "get", "post" ] | ||
}, | ||
{ | ||
"type": "http", | ||
"name": "$return", | ||
"direction": "out" | ||
} | ||
] | ||
} |
31 changes: 14 additions & 17 deletions
31
azure-functions-java-sample/src/main/java/com/microsoft/serverless/Miscellany.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
Oops, something went wrong.