comparison http/src/luan/modules/http/HttpServicer.java @ 495:598123096772

rename service() to respond()
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 15 May 2015 18:10:14 -0600
parents 2b9bc97f0439
children c65df5b25932
comparison
equal deleted inserted replaced
494:2b9bc97f0439 495:598123096772
93 } 93 }
94 94
95 private static LuanFunction getService(LuanState luan,LuanTable tbl) 95 private static LuanFunction getService(LuanState luan,LuanTable tbl)
96 throws LuanException 96 throws LuanException
97 { 97 {
98 Object service = tbl.get(luan,"service"); 98 Object respond = tbl.get(luan,"respond");
99 if( service == null ) 99 if( respond == null )
100 throw luan.exception( "function 'service' is not defined" ); 100 throw luan.exception( "function 'respond' is not defined" );
101 if( !(service instanceof LuanFunction) ) 101 if( !(respond instanceof LuanFunction) )
102 throw luan.exception( "'service' must be a function but is a " + Luan.type(service) ); 102 throw luan.exception( "'respond' must be a function but is a " + Luan.type(respond) );
103 return (LuanFunction)service; 103 return (LuanFunction)respond;
104 } 104 }
105 105
106 106
107 private final HttpServletRequest request; 107 private final HttpServletRequest request;
108 private final HttpServletResponse response; 108 private final HttpServletResponse response;