Back to project page simple-dash.
The source code is released under:
MIT License
If you think the Android project simple-dash listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.bmdtech.simpledash.event; /*from ww w . java 2s . co m*/ import org.joda.time.DateTime; public class ConnectivityEvent implements BaseEvent { private final Type type; private final DateTime timestamp; public ConnectivityEvent(Type type) { this.type = type; this.timestamp = DateTime.now(); } // convenience method public String getMessage() { return type.getMessage(); } public Type getType() { return type; } @Override public DateTime getTimestamp() { return timestamp; } public static enum Type { OPEN("Connected!"), ERROR("Connection error, will retry..."), RETRY("Retrying connection..."), TIMEOUT("Connection timed out, will retry..."), CLOSED("Connection closed, will retry..."); private String message; Type(String message) { this.message = message; } public String getMessage() { return message; } } }