Add a simple default constructor for whoas library consumers to use

This commit is contained in:
R. Tyler Croy 2014-12-30 21:22:52 -08:00
parent d9ee4411dc
commit 2689feb2cd
1 changed files with 10 additions and 0 deletions

View File

@ -13,6 +13,16 @@ class HookRequest {
/* Constructor for Jackson */
HookRequest() { }
/**
* Default constructor for creating a simple HookRequest with a URL and the
* POST data to be delivered to that URL
*/
HookRequest(String hookUrl, String hookData) {
this.retries = 0
this.url = hookUrl
this.postData = hookData
}
@JsonProperty
Long getRetries() {
return this.retries