首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

Java动态署理机制分析及扩展

2012-09-03 
Java动态代理机制分析及扩展最后,见演示程序的执行结果。清单 21. 执行输出Ticket Seller Class: class com

Java动态代理机制分析及扩展

最后,见演示程序的执行结果。

清单 21. 执行输出

Ticket Seller Class: class com.demo.proxy.test.TicketSellerProxy0 Ticket Theme: World Expo 2010 Query Ticket Price… >>> Enter method: getTicketPrice <<< Exit method: getTicketPrice Ticket Price: 180 RMB Transaction: Order 1 ticket(s) with 200 RMB >>> Enter method: buy <<< Exit method: buy Transaction: Succeed - Charge is 20 RMB Transaction: Order 1 ticket(s) with 160 RMB >>> Enter method: buy <<< Exit method: buy Transaction: Fail - Money is not enough. Still needs 20 RMB. Transaction: Order 250 ticket(s) with 30000 RMB >>> Enter method: buy <<< Exit method: buy Transaction: Fail - There is no enough ticket available for sale, only 199 ticket(s) left Updating Ticket Theme… Query Updated Ticket Theme… >>> Enter method: getTicketTheme <<< Exit method: getTicketTheme Updated Ticket Theme: World Expo 2010 in Shanghai

热点排行