@Override public String toString() { return ToStringUtil.toString(this);
}
// -------------------- JMX and Registration --------------------
@Override public String getObjectNameKeyProperties() {
StringBuilder name = new StringBuilder("type=Valve");
Container container = getContainer();
name.append(container.getMBeanKeyProperties());
int seq = 0;
// Pipeline may not be present in unit testing
Pipeline p = container.getPipeline(); if (p != null) { for (Valve valve : p.getValves()) { // Skip null valves if (valve == null) { continue;
} // Only compare valves in pipeline until we find this valve if (valve == this) { break;
} if (valve.getClass() == this.getClass()) { // Duplicate valve earlier in pipeline // increment sequence number
seq++;
}
}
}
if (seq > 0) {
name.append(",seq=");
name.append(seq);
}
String className = this.getClass().getName(); int period = className.lastIndexOf('.'); if (period >= 0) {
className = className.substring(period + 1);
}
name.append(",name=");
name.append(className);
return name.toString();
}
@Override public String getDomainInternal() {
Container c = getContainer(); if (c == null) { returnnull;
} else { return c.getDomain();
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.