|
22 | 22 | import org.jpos.core.Configurable;
|
23 | 23 | import org.jpos.core.Configuration;
|
24 | 24 | import org.jpos.core.ConfigurationException;
|
25 |
| -import org.jpos.util.ConcurrentUtil; |
26 |
| -import org.jpos.util.Log; |
27 |
| -import org.jpos.util.LogEvent; |
28 |
| -import org.jpos.util.Logger; |
| 25 | +import org.jpos.util.*; |
29 | 26 |
|
30 | 27 | import java.beans.BeanInfo;
|
31 | 28 | import java.beans.Introspector;
|
32 | 29 | import java.beans.PropertyDescriptor;
|
| 30 | +import java.io.ByteArrayOutputStream; |
33 | 31 | import java.io.Closeable;
|
| 32 | +import java.io.PrintStream; |
34 | 33 | import java.lang.reflect.Method;
|
35 | 34 | import java.net.URL;
|
36 | 35 | import java.util.Iterator;
|
@@ -240,6 +239,16 @@ public void setConfiguration (Configuration cfg)
|
240 | 239 | public Configuration getConfiguration () {
|
241 | 240 | return cfg;
|
242 | 241 | }
|
| 242 | + |
| 243 | + public String getDump () { |
| 244 | + if (this instanceof Loggeable) { |
| 245 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
| 246 | + PrintStream p = new PrintStream(baos); |
| 247 | + ((Loggeable)this).dump(p, ""); |
| 248 | + return baos.toString(); |
| 249 | + } |
| 250 | + return toString(); |
| 251 | + } |
243 | 252 | protected void initService() throws Exception {}
|
244 | 253 | protected void startService() throws Exception {}
|
245 | 254 | protected void stopService() throws Exception {}
|
|
0 commit comments