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.java46
1 files changed, 1 insertions, 45 deletions
diff --git a/src/org/traccar/GenericProtocolDecoder.java b/src/org/traccar/GenericProtocolDecoder.java
index b6755f95e..440b37dcb 100644
--- a/src/org/traccar/GenericProtocolDecoder.java
+++ b/src/org/traccar/GenericProtocolDecoder.java
@@ -46,18 +46,6 @@ public abstract class GenericProtocolDecoder extends OneToOneDecoder {
}
/**
- * Reset connection delay
- */
- private Integer resetDelay;
-
- /**
- * Set reset connection delay
- */
- public final void setResetDelay(Integer resetDelay) {
- this.resetDelay = resetDelay;
- }
-
- /**
* Default constructor
*/
public GenericProtocolDecoder() {
@@ -66,40 +54,8 @@ public abstract class GenericProtocolDecoder extends OneToOneDecoder {
/**
* Initialize
*/
- public GenericProtocolDecoder(DataManager dataManager, Integer resetDelay) {
+ public GenericProtocolDecoder(DataManager dataManager) {
setDataManager(dataManager);
- setResetDelay(resetDelay);
- }
-
- /**
- * Disconnect channel
- */
- private class DisconnectTask extends TimerTask {
- private Channel channel;
-
- public DisconnectTask(Channel channel) {
- this.channel = channel;
- }
-
- public void run() {
- channel.disconnect();
- }
- }
-
- /**
- * Handle connect event
- */
- @Override
- public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent evt) throws Exception {
- super.handleUpstream(ctx, evt);
-
- if (evt instanceof ChannelStateEvent) {
- ChannelStateEvent event = (ChannelStateEvent) evt;
-
- if (event.getState() == ChannelState.CONNECTED && event.getValue() != null && resetDelay != 0) {
- new Timer().schedule(new GenericProtocolDecoder.DisconnectTask(evt.getChannel()), resetDelay);
- }
- }
}
}