tailieunhanh - Java Extreme Programming Cookbook phần 10

thẻ Content Nội dung được sử dụng để xuất thông tin. Các thẻ này là đồng nghĩa với phương thức getter mà trả về một chuỗi. Các thẻ nội dung không bao giờ có những thông tin lồng nhau. Đoạn dưới đây cho thấy làm thế nào để sản xuất các tên phương pháp hiện tại bằng cách sử dụng thẻ trong mẫu Phương pháp xây dựng. | public abstract class AbstractTomcatTask extends Task private TomcatSupport tomcatsupport Overrides the base class implementation to instantiate the code TomcatSupport code class. public void init new TomcatSupport this getScriptToExecute isStarting @return the name of the script to execute. For Tomcat and higher a valid filename might be startup . The name of the script should strong not strong include the extension. public abstract String getScriptToExecute @return true if Tomcat is being started false if Tomcat is being stopped. public abstract boolean isStarting Called by Ant to start the execution of the target. public void execute throws BuildException Called by Ant to set the attribute testURL . This attribute is referenced in the buildfile. @param testURL a URL that is used to connect to Tomcat. This URL is used to validate that Tomcat is running. public void setTestURL String testURL testURL Called by Ant to set the attribute catalinaHome . This attribute is referenced in the buildfile. @param catalinaHome the full path to where Tomcat is installed. public void setCatalinaHome String catalinaHome catalinaHome @param timeout a number representing the timeout in milliseconds. The timeout must be greater than 10 seconds 10000 ms and less than 60 seconds 60000 ms . public void setTimeout String timeout try long temp timeout if temp 10000 temp 60000 temp else throw new BuildException Invalid timeout value timeout . The timeout must be between 10000 and 60000. catch NumberFormatException nfe throw new BuildException Invalid timeout value timeout This task defines three attributes 1. The testURL attribute specifies a URL that is used to determine when the server is started. For example http localhost 8080. 2. The catalinaHome attribute specifies where Tomcat is installed. This is the same as the .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.