Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jacob Hansson
committed
Dec 17, 2010
1 parent
0f84a7c
commit 8bba0dc
Showing
48 changed files
with
1,730 additions
and
805 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.voltvoodoo.saplo4j; | ||
|
||
import com.voltvoodoo.saplo4j.http.JsonCallback; | ||
import com.voltvoodoo.saplo4j.http.JsonRequest; | ||
|
||
|
||
/** | ||
* Use this to send raw-text requests to Saplo. Useful for testing and debugging | ||
* purposes. | ||
* | ||
* @author Jacob Hansson <jacob@voltvoodoo.com> | ||
* | ||
*/ | ||
public class RawSaploRequest implements JsonRequest { | ||
|
||
private String requestData; | ||
private JsonCallback callback; | ||
private SaploConnection connection; | ||
|
||
public RawSaploRequest(String requestData, | ||
JsonCallback callback, SaploConnection connection) { | ||
this.requestData = requestData; | ||
this.callback = callback; | ||
this.connection = connection; | ||
} | ||
|
||
public Object getRequestData() { | ||
return requestData; | ||
} | ||
|
||
public JsonCallback getCallback() { | ||
return callback; | ||
} | ||
|
||
public void setCallback(JsonCallback callback) { | ||
this.callback = callback; | ||
} | ||
|
||
public void send() { | ||
connection.call(this); | ||
} | ||
|
||
public long getRetryInterval() { | ||
return 1000 * 70; | ||
} | ||
|
||
} |
Oops, something went wrong.