source: java/main/src/main/java/com/framsticks/communication/queries/ApplicationRequest.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: 799 bytes
Line 
1package com.framsticks.communication.queries;
2
3import com.framsticks.communication.Request;
4import com.framsticks.util.lang.Pair;
5import com.framsticks.util.lang.Strings;
6
7
8/**
9 * @author Piotr Sniegowski
10 */
11public abstract class ApplicationRequest extends Request {
12
13        protected String path;
14
15        public ApplicationRequest path(String path) {
16                Strings.assureNotEmpty(path);
17                this.path = path;
18                return this;
19        }
20
21        public String getPath() {
22                return path;
23        }
24
25        public String getActualPath() {
26                return path;
27        }
28
29
30        @Override
31        protected StringBuilder construct(StringBuilder buffer) {
32                return buffer.append(path);
33        }
34
35        @Override
36        public CharSequence parseRest(CharSequence rest) {
37                final Pair<CharSequence, CharSequence> p = takeIdentifier(rest);
38                path = p.first.toString();
39                return p.second;
40        }
41
42}
Note: See TracBrowser for help on using the repository browser.