KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdo > tools > ant > LogDownloaderTask


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.jdo.tools.ant;
13
14 import com.versant.core.jdo.LogDownloader;
15
16 import org.apache.tools.ant.Task;
17 import org.apache.tools.ant.BuildException;
18 import com.versant.core.jdo.LogDownloader;
19
20 /**
21  * Ant task wrapper for LogDownloader.
22  */

23 public class LogDownloaderTask extends Task {
24
25     private LogDownloader bean = new LogDownloader();
26
27     public void execute() throws BuildException {
28         try {
29             LogDownloader.run(bean);
30         } catch (Exception JavaDoc e) {
31             throw new BuildException(e);
32         }
33     }
34
35     public void setProject(String JavaDoc project) {
36         bean.setProject(project);
37     }
38
39     public void setHost(String JavaDoc host) {
40         bean.setHost(host);
41     }
42
43     public void setPort(int port) {
44         bean.setPort(port);
45     }
46
47     public void setServer(String JavaDoc server) {
48         bean.setServer(server);
49     }
50
51     public void setUsername(String JavaDoc username) {
52         bean.setUsername(username);
53     }
54
55     public void setPassword(String JavaDoc password) {
56         bean.setPassword(password);
57     }
58
59     public void setEventPollSecs(int eventPollSecs) {
60         bean.setEventPollSecs(eventPollSecs);
61     }
62
63     public void setMetricPollSecs(int metricPollSecs) {
64         bean.setMetricPollSecs(metricPollSecs);
65     }
66
67     public void setAppend(boolean append) {
68         bean.setAppend(append);
69     }
70
71     public void setMaxFileSizeK(int maxFileSizeK) {
72         bean.setMaxFileSizeK(maxFileSizeK);
73     }
74
75     public void setBackups(int backups) {
76         bean.setBackups(backups);
77     }
78
79     public void setFilename(String JavaDoc filename) {
80         bean.setFilename(filename);
81     }
82
83     public void setEventBinary(boolean eventBinary) {
84         bean.setEventBinary(eventBinary);
85     }
86
87     public void setEventText(boolean eventText) {
88         bean.setEventText(eventText);
89     }
90
91     public void setMetricBinary(boolean metricBinary) {
92         bean.setMetricBinary(metricBinary);
93     }
94
95     public void setQuiet(boolean on) {
96         bean.setQuiet(on);
97     }
98
99     public void setDateFormat(String JavaDoc dateFormat) {
100         bean.setDateFormat(dateFormat);
101     }
102
103     public void setSingle(boolean on) {
104         bean.setSingle(on);
105     }
106
107 }
108
Popular Tags