Mercurial Hosting > luan
comparison http/src/luan/modules/http/LuanHandler.java @ 517:8dcf9e12446b
add Luan.on_luan_close()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 27 May 2015 01:20:49 -0600 |
parents | 2b9bc97f0439 |
children | 8a217fe5b4f3 |
comparison
equal
deleted
inserted
replaced
516:5752df8a67b5 | 517:8dcf9e12446b |
---|---|
20 | 20 |
21 public LuanHandler(LuanState luan) { | 21 public LuanHandler(LuanState luan) { |
22 this.luan = luan; | 22 this.luan = luan; |
23 } | 23 } |
24 | 24 |
25 public void handle(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response) | 25 @Override public void handle(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response) |
26 throws IOException | 26 throws IOException |
27 { | 27 { |
28 if( target.endsWith("/") ) | 28 if( target.endsWith("/") ) |
29 target += welcomeFile; | 29 target += welcomeFile; |
30 try { | 30 try { |
39 } | 39 } |
40 | 40 |
41 public void setWelcomeFile(String welcomeFile) { | 41 public void setWelcomeFile(String welcomeFile) { |
42 this.welcomeFile = welcomeFile; | 42 this.welcomeFile = welcomeFile; |
43 } | 43 } |
44 | |
45 @Override protected void doStop() throws Exception { | |
46 luan.close(); | |
47 //System.out.println("qqqqqqqqqqqqqqqqqqqq doStop "+this); | |
48 super.doStop(); | |
49 } | |
50 /* | |
51 @Override public void destroy() { | |
52 System.out.println("qqqqqqqqqqqqqqqqqqqq destroy "+this); | |
53 super.destroy(); | |
54 } | |
55 */ | |
44 } | 56 } |