private StatusReporter findStatusReporter(PooledDataSource pds, Document doc) { if (pds.getClass() == ComboPooledDataSource.class) return new CpdsStatusReporter((ComboPooledDataSource) pds, doc); else if (pds.getClass() == PoolBackedDataSource.class) return new PbdsStatusReporter((PoolBackedDataSource) pds, doc); else return new UnknownPdsStatusReporter(pds, doc); }
public Element reportDtElem() { StringBuffer sb = new StringBuffer(255); sb.append(shortTypeName); sb.append(" [ dataSourceName: "); sb.append(pds.getDataSourceName()); sb.append("; identityToken: "); sb.append(pds.getIdentityToken()); sb.append(" ]"); Element dtElem = doc.createElement("dt"); dtElem.appendChild(doc.createTextNode(sb.toString())); return dtElem; }
UnknownPdsStatusReporter(PooledDataSource pds, Document doc) { this(pds.getClass().getName(), pds, doc); }