Last change
on this file since 77 was
77,
checked in by psniegowski, 11 years ago
|
Add new java codebase.
|
File size:
615 bytes
|
Rev | Line | |
---|
[77] | 1 | package com.framsticks.communication.queries; |
---|
| 2 | |
---|
| 3 | import com.framsticks.communication.Request; |
---|
| 4 | |
---|
| 5 | /** |
---|
| 6 | * @author Piotr Sniegowski |
---|
| 7 | */ |
---|
| 8 | public class RegistrationRequest extends ApplicationRequest { |
---|
| 9 | boolean register = true; |
---|
| 10 | |
---|
| 11 | public RegistrationRequest() { |
---|
| 12 | } |
---|
| 13 | |
---|
| 14 | public RegistrationRequest register(boolean register) { |
---|
| 15 | this.register = register; |
---|
| 16 | return this; |
---|
| 17 | } |
---|
| 18 | |
---|
| 19 | @Override |
---|
| 20 | protected StringBuilder construct(StringBuilder buffer) { |
---|
| 21 | super.construct(buffer); |
---|
| 22 | if (!register) { |
---|
| 23 | buffer.append(" remove"); |
---|
| 24 | } |
---|
| 25 | return buffer; |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | public String getCommand() { |
---|
| 29 | return register ? "reg" : "call"; |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.