ready javadoc
This commit is contained in:
9
pom.xml
9
pom.xml
@@ -35,6 +35,15 @@
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.9</version>
|
||||
<configuration>
|
||||
<show>protected</show>
|
||||
<windowtitle>Engine.IO Client API</windowtitle>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
|
||||
@@ -57,7 +57,7 @@ public abstract class Transport extends Emitter {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Emitter open() {
|
||||
public Transport open() {
|
||||
if (this.readyState == CLOSED || this.readyState < 0) {
|
||||
this.readyState = OPENING;
|
||||
this.doOpen();
|
||||
@@ -117,6 +117,5 @@ public abstract class Transport extends Emitter {
|
||||
public int port;
|
||||
public int policyPort;
|
||||
public Map<String, String> query;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,11 +78,11 @@ public class PollingXHR extends Polling {
|
||||
this.pollXhr = req;
|
||||
}
|
||||
|
||||
private static class Request extends Emitter {
|
||||
public static class Request extends Emitter {
|
||||
|
||||
private static final String EVENT_SUCCESS = "success";
|
||||
private static final String EVENT_DATA = "data";
|
||||
private static final String EVENT_ERROR = "error";
|
||||
public static final String EVENT_SUCCESS = "success";
|
||||
public static final String EVENT_DATA = "data";
|
||||
public static final String EVENT_ERROR = "error";
|
||||
|
||||
private static final ExecutorService xhrService = Executors.newCachedThreadPool();
|
||||
|
||||
@@ -149,22 +149,22 @@ public class PollingXHR extends Polling {
|
||||
});
|
||||
}
|
||||
|
||||
public void onSuccess() {
|
||||
private void onSuccess() {
|
||||
this.emit(EVENT_SUCCESS);
|
||||
this.cleanup();
|
||||
}
|
||||
|
||||
public void onData(String data) {
|
||||
private void onData(String data) {
|
||||
this.emit(EVENT_DATA, data);
|
||||
this.onSuccess();
|
||||
}
|
||||
|
||||
public void onError(Exception err) {
|
||||
private void onError(Exception err) {
|
||||
this.emit(EVENT_ERROR, err);
|
||||
this.cleanup();
|
||||
}
|
||||
|
||||
public void cleanup() {
|
||||
private void cleanup() {
|
||||
if (xhr != null) {
|
||||
xhr.disconnect();
|
||||
xhr = null;
|
||||
@@ -177,10 +177,9 @@ public class PollingXHR extends Polling {
|
||||
|
||||
public static class Options {
|
||||
|
||||
String uri;
|
||||
String method;
|
||||
String data;
|
||||
|
||||
public String uri;
|
||||
public String method;
|
||||
public String data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class WebSocket extends Transport {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose() {
|
||||
protected void onClose() {
|
||||
if (this.bufferedAmountId != null) {
|
||||
this.bufferedAmountId.cancel(true);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
public class Parser {
|
||||
|
||||
public static final int protocol = 2;
|
||||
public static final Map<String, Integer> packets = new HashMap<String, Integer>() {{
|
||||
private static final Map<String, Integer> packets = new HashMap<String, Integer>() {{
|
||||
put(Packet.OPEN, 0);
|
||||
put(Packet.CLOSE, 1);
|
||||
put(Packet.PING, 2);
|
||||
@@ -16,7 +16,7 @@ public class Parser {
|
||||
put(Packet.UPGRADE, 5);
|
||||
put(Packet.NOOP, 6);
|
||||
}};
|
||||
public static final Map<Integer, String> bipackets = new HashMap<Integer, String>();
|
||||
private static final Map<Integer, String> bipackets = new HashMap<Integer, String>();
|
||||
static {
|
||||
for (Map.Entry<String, Integer> entry : packets.entrySet()) {
|
||||
bipackets.put(entry.getValue(), entry.getKey());
|
||||
|
||||
Reference in New Issue
Block a user