KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdo > LogDownloaderBeanInfo


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;
13
14 import java.beans.SimpleBeanInfo JavaDoc;
15 import java.beans.PropertyDescriptor JavaDoc;
16 import java.beans.IntrospectionException JavaDoc;
17
18 import com.versant.core.common.BindingSupportImpl;
19 import com.versant.core.jdo.LogDownloader;
20
21 /**
22  * Property info for LogDownloader.
23  * @keep-all
24  */

25 public class LogDownloaderBeanInfo extends SimpleBeanInfo JavaDoc {
26
27     public LogDownloaderBeanInfo() {
28     }
29
30     public PropertyDescriptor JavaDoc[] getPropertyDescriptors() {
31         try {
32             String JavaDoc[] s = new String JavaDoc[]{
33                 "eventPollSecs", "Event poll seconds",
34                     "Time in seconds between polls of the event ring buffer",
35                 "metricPollSecs", "Metric poll seconds",
36                     "Time in seconds between polls of the metric snapshot ring buffer",
37                 "append", "Append",
38                     "Append to end of existing event text file (if any)",
39                 "maxFileSizeK", "Max file size in K",
40                     "Maximum size for a file before rollover to backup",
41                 "backups", "Number of backups",
42                     "Number of old log files to keep (filename.jdolog.1, filename.jdolog.2, ...)",
43                 "filename", "Filename",
44                     "Data is written to files based on this name (default is jdogenie_<server>)",
45                 "eventBinary", "Write event binary file",
46                     "Write events to a binary file (filename.jdolog, open in management console)",
47                 "eventText", "Write event text file",
48                     "Write events to text file (filename.txt, for tail -f)",
49                 "metricBinary", "Write metric binary file",
50                     "Write metric snapshots to binary file (filename.jdoperf, open in management console)",
51                 "dateFormat", "Date format",
52                     "Date format for event text file (for java.text.SimpleDateFormat)",
53             };
54             int n = s.length / 3;
55             PropertyDescriptor JavaDoc[] ans = new PropertyDescriptor JavaDoc[n];
56             int q = 0;
57             for (int i = 0; i < n; i++, q += 3) {
58                 PropertyDescriptor JavaDoc p = new PropertyDescriptor JavaDoc(
59                     s[q], LogDownloader.class);
60                 p.setDisplayName(s[q + 1]);
61                 p.setShortDescription(s[q + 2]);
62                 ans[i] = p;
63             }
64             return ans;
65         } catch (IntrospectionException JavaDoc e) {
66             throw BindingSupportImpl.getInstance().internal(
67                     e.getClass().getName() + ": " + e.getMessage(), e);
68         }
69     }
70
71 }
72
73  
74
Popular Tags