source: java/main/src/main/java/com/framsticks/communication/ManagedConnection.java @ 193

Last change on this file since 193 was 193, checked in by Maciej Komosinski, 10 years ago

Set svn:eol-style native for all textual files

  • Property svn:eol-style set to native
File size: 792 bytes
Line 
1package com.framsticks.communication;
2
3import java.util.HashSet;
4import java.util.Set;
5
6import com.framsticks.util.lang.Pair;
7
8public abstract class ManagedConnection extends Connection {
9
10        public boolean requestIdEnabled = false;
11
12        protected int protocolVersion = -1;
13
14        protected Set<String> requestedFeatures = new HashSet<String>();
15
16        public ManagedConnection() {
17        }
18
19        protected final Pair<Integer, CharSequence> takeRequestId(CharSequence line) {
20                return Request.takeRequestId(requestIdEnabled, line);
21        }
22
23        /**
24         * Returns Query associated with query getId.
25         *
26         * @return Query associated with query getId.
27         */
28        public int getProtocolVersion() {
29                return protocolVersion;
30        }
31
32        @Override
33        protected void joinableInterrupt() {
34                protocolVersion = -1;
35                super.joinableInterrupt();
36        }
37
38}
Note: See TracBrowser for help on using the repository browser.