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:
666 bytes
|
Line | |
---|
1 | package com.framsticks.communication.queries; |
---|
2 | |
---|
3 | import com.framsticks.util.lang.Strings; |
---|
4 | |
---|
5 | /** |
---|
6 | * @author Piotr Sniegowski |
---|
7 | */ |
---|
8 | public class UseRequest extends ProtocolRequest { |
---|
9 | protected String feature; |
---|
10 | |
---|
11 | public UseRequest feature(String feature) { |
---|
12 | this.feature = feature; |
---|
13 | return this; |
---|
14 | } |
---|
15 | |
---|
16 | @Override |
---|
17 | public String getCommand() { |
---|
18 | return "use"; |
---|
19 | } |
---|
20 | |
---|
21 | @Override |
---|
22 | protected StringBuilder construct(StringBuilder buffer) { |
---|
23 | return buffer.append(feature); |
---|
24 | } |
---|
25 | |
---|
26 | @Override |
---|
27 | public CharSequence parseRest(CharSequence rest) { |
---|
28 | feature = rest.toString(); |
---|
29 | Strings.assureNotEmpty(feature); |
---|
30 | return null; |
---|
31 | } |
---|
32 | |
---|
33 | public final String getFeature() { |
---|
34 | return feature; |
---|
35 | } |
---|
36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.