aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/GenericProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/GenericProtocolDecoder.java')
-rw-r--r--src/org/traccar/GenericProtocolDecoder.java30
1 files changed, 25 insertions, 5 deletions
diff --git a/src/org/traccar/GenericProtocolDecoder.java b/src/org/traccar/GenericProtocolDecoder.java
index 0d79818ab..c48cf6c56 100644
--- a/src/org/traccar/GenericProtocolDecoder.java
+++ b/src/org/traccar/GenericProtocolDecoder.java
@@ -35,9 +35,16 @@ public abstract class GenericProtocolDecoder extends OneToOneDecoder {
private DataManager dataManager;
/**
+ * Set data manager
+ */
+ public final void setDataManager(DataManager dataManager) {
+ this.dataManager = dataManager;
+ }
+
+ /**
* Return data manager
*/
- public DataManager getDataManager() {
+ public final DataManager getDataManager() {
return dataManager;
}
@@ -45,14 +52,27 @@ public abstract class GenericProtocolDecoder extends OneToOneDecoder {
* Reset connection delay
*/
private Integer resetDelay;
-
+
/**
- * Initialize variables
+ * Set reset connection delay
*/
- public GenericProtocolDecoder(DataManager dataManager, Integer resetDelay) {
- this.dataManager = dataManager;
+ public final void setResetDelay(Integer resetDelay) {
this.resetDelay = resetDelay;
}
+
+ /**
+ * Default constructor
+ */
+ public GenericProtocolDecoder() {
+ }
+
+ /**
+ * Initialize
+ */
+ public GenericProtocolDecoder(DataManager dataManager, Integer resetDelay) {
+ setDataManager(dataManager);
+ setResetDelay(resetDelay);
+ }
/**
* Disconnect channel