1 2 12 package com.versant.core.jdo; 13 14 import java.beans.SimpleBeanInfo ; 15 import java.beans.PropertyDescriptor ; 16 import java.beans.IntrospectionException ; 17 18 import com.versant.core.common.BindingSupportImpl; 19 import com.versant.core.jdo.LogDownloader; 20 21 25 public class LogDownloaderBeanInfo extends SimpleBeanInfo { 26 27 public LogDownloaderBeanInfo() { 28 } 29 30 public PropertyDescriptor [] getPropertyDescriptors() { 31 try { 32 String [] s = new String []{ 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 [] ans = new PropertyDescriptor [n]; 56 int q = 0; 57 for (int i = 0; i < n; i++, q += 3) { 58 PropertyDescriptor p = new PropertyDescriptor ( 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 e) { 66 throw BindingSupportImpl.getInstance().internal( 67 e.getClass().getName() + ": " + e.getMessage(), e); 68 } 69 } 70 71 } 72 73 74 | Popular Tags |