Jakarta-Common-Chain操纵笔记[Java编程]
本文“Jakarta-Common-Chain操纵笔记[Java编程]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
可以在你需求定义和履行一些次序操作的时刻采取Commons Chain.
下载地址:http://commons.apache.org/downloads/download_chain.cgi
五个工作类:
GetCustomerInfo.jar
package demo.chain;
import org.apache.commons.chain.Command;
import org.apache.commons.chain.Context;
public class GetCustomerInfo implements Command ...{
public boolean execute(Context context) throws Exception ...{
System.out.println("Get customer info");
context.put("customerName","George Burdell");
return false;
}
}
TestDriveVehicle.jar
package demo.chain;
import org.apache.commons.chain.Command;
import org.apache.commons.chain.Context;
public class TestDriveVehicle implements Command ...{
public boolean execute(Context context) throws Exception ...{
System.out.println("Test drive the vehicle");
return false;
}
}
NegotiateSale.jar
package demo.chain;
import org.apache.commons.chain.Command;
import org.apache.commons.chain.Context;
public class NegotiateSale implements Command ...{
public boolean execute(Context context) throws Exception ...{
System.out.println("Negotiate sale");
return false;
}
}
以上是“Jakarta-Common-Chain操纵笔记[Java编程]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |