Last change
on this file 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
|
Rev | Line | |
---|
[97] | 1 | package com.framsticks.communication; |
---|
| 2 | |
---|
[103] | 3 | import java.util.HashSet; |
---|
| 4 | import java.util.Set; |
---|
| 5 | |
---|
[97] | 6 | import com.framsticks.util.lang.Pair; |
---|
| 7 | |
---|
| 8 | public abstract class ManagedConnection extends Connection { |
---|
| 9 | |
---|
| 10 | public boolean requestIdEnabled = false; |
---|
| 11 | |
---|
| 12 | protected int protocolVersion = -1; |
---|
| 13 | |
---|
[103] | 14 | protected Set<String> requestedFeatures = new HashSet<String>(); |
---|
| 15 | |
---|
[97] | 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.