Skip to content

Commit

Permalink
Stability fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Hansson committed Dec 17, 2010
1 parent 0f84a7c commit 8bba0dc
Show file tree
Hide file tree
Showing 48 changed files with 1,730 additions and 805 deletions.
17 changes: 15 additions & 2 deletions pom.xml
Expand Up @@ -54,7 +54,6 @@
<artifactId>json-simple</artifactId>
<version>1.1</version>
<type>jar</type>
<scope />
</dependency>

<!-- Temporary until Netty 3.2 is available in public maven repos. -->
Expand All @@ -70,7 +69,21 @@
<artifactId>junit</artifactId>
<version>4.8.2</version>
<type>jar</type>
<scope>compile</scope>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<type>jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.simpleframework</groupId>
<artifactId>simple</artifactId>
<version>4.1.21</version>
<type>jar</type>
<scope>test</scope>
</dependency>
</dependencies>

Expand Down
47 changes: 47 additions & 0 deletions src/main/java/com/voltvoodoo/saplo4j/RawSaploRequest.java
@@ -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;
}

}

0 comments on commit 8bba0dc

Please sign in to comment.