annotate src/main/java/app/bbs/NetworkJungleBulletinBoard.java @ 143:7a7bac51a3cc

Added RequestNumCheckServlet
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Sun, 26 Jan 2014 16:45:58 +0900
parents c1d75b031b15
children 29734d7d6521
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
112
8f9811a1e00c Moved app files
one
parents: 105
diff changeset
1 package app.bbs;
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
2
135
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
3 import java.io.File;
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
4 import java.io.IOException;
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
5 import java.nio.ByteBuffer;
56
ccfe9b5e8f11 bug LogUpdateCodeSegment
one
parents: 52
diff changeset
6 import java.util.Date;
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
7 import java.util.concurrent.atomic.AtomicInteger;
39
10359a815068 add alice.jungle.codesegment.remote
one
parents: 38
diff changeset
8
10359a815068 add alice.jungle.codesegment.remote
one
parents: 38
diff changeset
9 import alice.jungle.core.NetworkDefaultJungle;
124
dacfa7eba841 To select persistent mode "-persistent"
one
parents: 123
diff changeset
10 import alice.jungle.persistent.AliceJournal;
135
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
11 import alice.jungle.persistent.NetworkJournal;
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
12 import alice.jungle.persistent.PersistentJournal;
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
13 import alice.jungle.transaction.JungleUpdater;
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
14 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.Jungle;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
15 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTree;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
16 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTreeEditor;
125
6104702a1880 Added dependency bulletinboard in pom.xml
one
parents: 124
diff changeset
17 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.bbs.BoardMessage;
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
18 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.Children;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
19 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.Node;
135
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
20 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.persistent.ChangeList;
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
21 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.persistent.ChangeListReader;
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
22 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultNodePath;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
23 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultTreeEditor;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
24 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.trasnformer.EditableNode;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
25 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.trasnformer.NodeEditor;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
26 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.traverser.DefaultTraverser;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
27 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.DefaultEither;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
28 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
29 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
30 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.IterableConverter;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
31
124
dacfa7eba841 To select persistent mode "-persistent"
one
parents: 123
diff changeset
32 public class NetworkJungleBulletinBoard implements NetworkBulletinBoard
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
33 {
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
34 private final Jungle jungle;
135
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
35 private final NetworkJournal journal;
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
36 private final String LOG_DIR;
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
37 private Boolean persistentFlag;
143
7a7bac51a3cc Added RequestNumCheckServlet
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 139
diff changeset
38 private AtomicInteger requestCounter = new AtomicInteger(0);
135
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
39
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
40 private NetworkJungleBulletinBoard(String _uuid, NetworkJournal _journal)
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
41 {
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
42 journal = _journal;
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
43 jungle = new NetworkDefaultJungle(journal, _uuid,new DefaultTreeEditor(new DefaultTraverser()));
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
44 BulletinBoardJungleManager.setJungle(jungle);
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
45 persistentFlag = false;
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
46 LOG_DIR = "./log";
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
47 }
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
48
124
dacfa7eba841 To select persistent mode "-persistent"
one
parents: 123
diff changeset
49 public NetworkJungleBulletinBoard(String _uuid)
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
50 {
135
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
51 this(_uuid, new AliceJournal());
124
dacfa7eba841 To select persistent mode "-persistent"
one
parents: 123
diff changeset
52 jungle.createNewTree("boards");
135
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
53 }
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
54
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
55 public static NetworkBulletinBoard NewPersistentJungle(String _uuid)
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
56 {
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
57 NetworkJungleBulletinBoard board = new NetworkJungleBulletinBoard(_uuid, new PersistentJournal());
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
58 board.persistentFlag = true;
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
59 return board;
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
60 }
118
f64ff5bd66f5 Implements persistent for bbs app and Fixed bug JungleUpdater
one
parents: 112
diff changeset
61
124
dacfa7eba841 To select persistent mode "-persistent"
one
parents: 123
diff changeset
62 public void init() {
135
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
63 if(!persistentFlag) {
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
64 return;
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
65 }
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
66 checkAndCreateLogDirectory();
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
67 try {
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
68 commitLogRecover();
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
69 } catch (IOException e) {
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
70 e.printStackTrace();
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
71 }
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
72 }
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
73
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
74 public void checkAndCreateLogDirectory() {
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
75 File logFile = new File(LOG_DIR);
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
76 if(!logFile.exists()) {
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
77 logFile.mkdir();
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
78 return;
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
79 }
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
80 if (logFile.isFile()) {
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
81 logFile.delete();
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
82 logFile.mkdir();
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
83 }
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
84 }
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
85
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
86 public void commitLogRecover() throws IOException {
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
87 File[] logFiles = new File(LOG_DIR).listFiles();
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
88 for(File logFile : logFiles) {
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
89 commitLogRecover(logFile);
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
90 logFile.delete();
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
91 }
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
92 if(jungle.getTreeByName("boards") == null) {
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
93 jungle.createNewTree("boards");
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
94 }
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
95 }
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
96
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
97 private void commitLogRecover(File logFile) throws IOException {
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
98 journal.setInputFile(logFile);
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
99 ChangeListReader reader = journal.getReader();
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
100 if (reader == null) return;
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
101 for (ChangeList chList : reader) {
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
102 String treeName = chList.getTreeName();
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
103 JungleTree tree = jungle.getTreeByName(treeName);
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
104 if(tree == null) {
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
105 tree = jungle.createNewTree(treeName);
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
106 }
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
107 JungleTreeEditor editor = tree.getLocalTreeEditor();
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
108 Either<Error, JungleTreeEditor> either = JungleUpdater.edit(editor, chList);
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
109 editor = either.b();
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
110 if(either.isA()) {
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
111 throw new IOException("Failed commit log recovery");
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
112 }
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
113 editor.success();
2e8034524259 Added NetworkJournal and SingletonMessageFromAlice class
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
114 }
118
f64ff5bd66f5 Implements persistent for bbs app and Fixed bug JungleUpdater
one
parents: 112
diff changeset
115 }
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
116
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
117 public Iterable<String> getBoards()
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
118 {
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
119 JungleTree tree = jungle.getTreeByName("boards");
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
120 Node node = tree.getRootNode();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
121 Children<Node> chs = node.getChildren();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
122
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
123 IterableConverter.Converter<String,Node> converter = new IterableConverter.Converter<String,Node>(){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
124 public String conv(Node _b) {
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
125 ByteBuffer e = _b.getAttributes().get("name");
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
126 return new String(e.array());
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
127 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
128 };
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
129
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
130 return new IterableConverter<String,Node>(chs,converter);
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
131 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
132
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
133 public void createBoards(final String _name,final String _author,final String _initMessage,final String _editKey)
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
134 {
143
7a7bac51a3cc Added RequestNumCheckServlet
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 139
diff changeset
135 requestCounter.incrementAndGet();
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
136 if(null == jungle.createNewTree(_name)){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
137 throw new IllegalStateException();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
138 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
139
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
140 JungleTree tree = jungle.getTreeByName("boards");
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
141 JungleTreeEditor editor = tree.getTreeEditor();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
142 DefaultNodePath root = new DefaultNodePath();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
143 Either<Error,JungleTreeEditor> either = editor.addNewChildAt(root,0);
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
144 if(either.isA()){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
145 throw new IllegalStateException();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
146 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
147 editor = either.b();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
148
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
149 either = editor.putAttribute(root.add(0),"name",ByteBuffer.wrap(_name.getBytes()));
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
150 if(either.isA()){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
151 throw new IllegalStateException();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
152 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
153 editor = either.b();
129
1a3edba05f50 Fixed bug NetworkJungleBulletinBoard
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 126
diff changeset
154 final long timestamp = new Date().getTime();
1a3edba05f50 Fixed bug NetworkJungleBulletinBoard
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 126
diff changeset
155 ByteBuffer tBuffer = ByteBuffer.allocate(16);
1a3edba05f50 Fixed bug NetworkJungleBulletinBoard
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 126
diff changeset
156 either = editor.putAttribute(root.add(0),"timestamp", tBuffer.putLong(timestamp));
1a3edba05f50 Fixed bug NetworkJungleBulletinBoard
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 126
diff changeset
157 if(either.isA()){
1a3edba05f50 Fixed bug NetworkJungleBulletinBoard
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 126
diff changeset
158 throw new IllegalStateException();
1a3edba05f50 Fixed bug NetworkJungleBulletinBoard
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 126
diff changeset
159 }
1a3edba05f50 Fixed bug NetworkJungleBulletinBoard
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 126
diff changeset
160 editor = either.b();
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
161 Either<Error,JungleTreeEditor> result = editor.success();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
162 if(result.isA()){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
163 throw new IllegalStateException();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
164 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
165
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
166 tree = jungle.getTreeByName(_name);
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
167 editor = tree.getTreeEditor();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
168 either = editor.addNewChildAt(root,0);
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
169 if(either.isA()){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
170 throw new IllegalStateException();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
171 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
172 editor = either.b();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
173
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
174 NodeEditor e = new NodeEditor(){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
175 public <T extends EditableNode<T>> Either<Error, T> edit(T _e){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
176 _e = _e.getAttributes().put("author",ByteBuffer.wrap(_author.getBytes())).b();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
177 _e = _e.getAttributes().put("mes",ByteBuffer.wrap(_initMessage.getBytes())).b();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
178 _e = _e.getAttributes().put("key",ByteBuffer.wrap(_editKey.getBytes())).b();
130
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 129
diff changeset
179 ByteBuffer tBuffer2 = ByteBuffer.allocate(16);
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 129
diff changeset
180 _e = _e.getAttributes().put("timestamp",tBuffer2.putLong(timestamp)).b();
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
181 return DefaultEither.newB(_e);
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
182 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
183 };
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
184
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
185 either = editor.edit(root.add(0),e);
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
186 if(either.isA()){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
187 throw new IllegalStateException();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
188 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
189 editor = either.b();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
190 editor.success();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
191 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
192
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
193 public void createBoardMessage(final String _board,final String _author,final String _message,final String _editKey)
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
194 {
143
7a7bac51a3cc Added RequestNumCheckServlet
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 139
diff changeset
195 requestCounter.incrementAndGet();
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
196 JungleTree tree = jungle.getTreeByName(_board);
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
197 if(tree == null){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
198 throw new IllegalStateException();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
199 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
200
46
fd3643699f83 modified pom.xml. fix conflict log4j libraries
one
parents: 45
diff changeset
201 Either<Error, JungleTreeEditor> either;
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
202 do{
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
203 Node node = tree.getRootNode();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
204 int size = node.getChildren().size();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
205 DefaultNodePath path = new DefaultNodePath();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
206
65
ebf42371454b remove warning
one
parents: 64
diff changeset
207 JungleTreeEditor editor = tree.getTreeEditor();
46
fd3643699f83 modified pom.xml. fix conflict log4j libraries
one
parents: 45
diff changeset
208 either = editor.addNewChildAt(path,size);
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
209 if(either.isA()){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
210 throw new IllegalStateException();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
211 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
212 editor = either.b();
56
ccfe9b5e8f11 bug LogUpdateCodeSegment
one
parents: 52
diff changeset
213 final long timestamp = new Date().getTime();
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
214 NodeEditor e = new NodeEditor(){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
215 public <T extends EditableNode<T>> Either<Error, T> edit(T _e){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
216 _e = _e.getAttributes().put("author",ByteBuffer.wrap(_author.getBytes())).b();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
217 _e = _e.getAttributes().put("mes",ByteBuffer.wrap(_message.getBytes())).b();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
218 _e = _e.getAttributes().put("key",ByteBuffer.wrap(_editKey.getBytes())).b();
56
ccfe9b5e8f11 bug LogUpdateCodeSegment
one
parents: 52
diff changeset
219 ByteBuffer tBuffer = ByteBuffer.allocate(16);
ccfe9b5e8f11 bug LogUpdateCodeSegment
one
parents: 52
diff changeset
220 _e = _e.getAttributes().put("timestamp",tBuffer.putLong(timestamp)).b();
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
221 return DefaultEither.newB(_e);
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
222 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
223 };
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
224 path = path.add(size);
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
225 either = editor.edit(path,e);
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
226 if(either.isA()){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
227 throw new IllegalStateException();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
228 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
229 editor = either.b();
46
fd3643699f83 modified pom.xml. fix conflict log4j libraries
one
parents: 45
diff changeset
230 either = editor.success();
93
75cf01a430a6 Added LocalTreeEditor
one
parents: 92
diff changeset
231
46
fd3643699f83 modified pom.xml. fix conflict log4j libraries
one
parents: 45
diff changeset
232 }while(either.isA());
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
233 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
234
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
235 public void editMessage(String _board,String _uuid,final String _author,final String _message,final String _editKey)
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
236 {
143
7a7bac51a3cc Added RequestNumCheckServlet
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 139
diff changeset
237 requestCounter.incrementAndGet();
139
c1d75b031b15 Added EditMessageUseGetServlet
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 135
diff changeset
238 final long timestamp = new Date().getTime();
65
ebf42371454b remove warning
one
parents: 64
diff changeset
239 for(;;) {
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
240 DefaultNodePath path = new DefaultNodePath();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
241 path = path.add(Integer.parseInt(_uuid));
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
242
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
243 JungleTree tree = jungle.getTreeByName(_board);
65
ebf42371454b remove warning
one
parents: 64
diff changeset
244 JungleTreeEditor editor = tree.getTreeEditor();
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
245 NodeEditor e = new NodeEditor(){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
246 public <T extends EditableNode<T>> Either<Error, T> edit(T _e){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
247 _e = _e.getAttributes().put("author",ByteBuffer.wrap(_author.getBytes())).b();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
248 _e = _e.getAttributes().put("mes",ByteBuffer.wrap(_message.getBytes())).b();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
249 _e = _e.getAttributes().put("key",ByteBuffer.wrap(_editKey.getBytes())).b();
56
ccfe9b5e8f11 bug LogUpdateCodeSegment
one
parents: 52
diff changeset
250 ByteBuffer tBuffer = ByteBuffer.allocate(16);
ccfe9b5e8f11 bug LogUpdateCodeSegment
one
parents: 52
diff changeset
251 _e = _e.getAttributes().put("timestamp",tBuffer.putLong(timestamp)).b();
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
252 return DefaultEither.newB(_e);
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
253 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
254 };
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
255
65
ebf42371454b remove warning
one
parents: 64
diff changeset
256 Either<Error, JungleTreeEditor> either = editor.edit(path,e);
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
257 if(either.isA()){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
258 throw new IllegalStateException();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
259 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
260 editor = either.b();
46
fd3643699f83 modified pom.xml. fix conflict log4j libraries
one
parents: 45
diff changeset
261 either = editor.success();
65
ebf42371454b remove warning
one
parents: 64
diff changeset
262 if(!either.isA()) {
ebf42371454b remove warning
one
parents: 64
diff changeset
263 return;
ebf42371454b remove warning
one
parents: 64
diff changeset
264 }
ebf42371454b remove warning
one
parents: 64
diff changeset
265 }
ebf42371454b remove warning
one
parents: 64
diff changeset
266
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
267 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
268
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
269 public Iterable<BoardMessage> getMessages(String _boardName)
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
270 {
143
7a7bac51a3cc Added RequestNumCheckServlet
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 139
diff changeset
271 requestCounter.incrementAndGet();
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
272 JungleTree tree = jungle.getTreeByName(_boardName);
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
273 Node node = tree.getRootNode();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
274 Children<Node> chs = node.getChildren();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
275 final AtomicInteger counter = new AtomicInteger(0);
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
276 IterableConverter.Converter<BoardMessage,Node> converter = new IterableConverter.Converter<BoardMessage,Node>(){
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
277 public BoardMessage conv(Node _b) {
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
278 String uuid = Integer.toString(counter.get());
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
279 String author = new String(_b.getAttributes().get("author").array());
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
280 String message = new String(_b.getAttributes().get("mes").array());
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
281 counter.incrementAndGet();
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
282 return new BoardMessageImpl(author,message,uuid);
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
283 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
284 };
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
285 return new IterableConverter<BoardMessage,Node>(chs,converter);
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
286 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
287
143
7a7bac51a3cc Added RequestNumCheckServlet
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 139
diff changeset
288 public int getRequestNum() {
7a7bac51a3cc Added RequestNumCheckServlet
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 139
diff changeset
289 return requestCounter.get();
7a7bac51a3cc Added RequestNumCheckServlet
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 139
diff changeset
290 }
46
fd3643699f83 modified pom.xml. fix conflict log4j libraries
one
parents: 45
diff changeset
291
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
292 private static class BoardMessageImpl implements BoardMessage
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
293 {
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
294 private final String author;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
295 private final String message;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
296 private final String uuid;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
297
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
298 public BoardMessageImpl(String _author,String _message,String _uuid)
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
299 {
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
300 author = _author;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
301 message = _message;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
302 uuid = _uuid;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
303 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
304
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
305 public String getAuthor()
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
306 {
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
307 return author;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
308 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
309
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
310 public String getMessage()
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
311 {
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
312 return message;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
313 }
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
314
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
315 public String getUUID()
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
316 {
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
317 return uuid;
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
318 }
143
7a7bac51a3cc Added RequestNumCheckServlet
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 139
diff changeset
319
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
320 }
124
dacfa7eba841 To select persistent mode "-persistent"
one
parents: 123
diff changeset
321
38
d8ee57a1c2c6 add pom.xml and bbs
one
parents:
diff changeset
322 }