01: /*
02: * This file is part of the QuickServer library
03: * Copyright (C) 2003-2005 QuickServer.org
04: *
05: * Use, modification, copying and distribution of this software is subject to
06: * the terms and conditions of the GNU Lesser General Public License.
07: * You should have received a copy of the GNU LGP License along with this
08: * library; if not, you can download a copy from <http://www.quickserver.org/>.
09: *
10: * For questions, suggestions, bug-reports, enhancement-requests etc.
11: * visit http://www.quickserver.org
12: *
13: */
14:
15: package echowebserver;
16:
17: import org.quickserver.net.server.*;
18: import org.quickserver.net.ServerHook;
19:
20: /**
21: * PrepareHook
22: * @author Akshathkumar Shetty
23: */
24: public class PrepareHook implements ServerHook {
25: private QuickServer quickserver;
26:
27: public String info() {
28: return "Init Server Hook to setup logging.";
29: }
30:
31: public void initHook(QuickServer quickserver) {
32: this .quickserver = quickserver;
33: }
34:
35: public boolean handleEvent(int event) {
36: if (event == ServerHook.PRE_STARTUP) {
37: EchoWSCommandHandler.init(quickserver);
38: return true;
39: }
40: return false;
41: }
42: }
|