use of org.apache.catalina.JmxEnabled in project tomcat by apache.
the class StandardHost method getValveNames.
// -------------------- JMX --------------------
/**
* @return the MBean Names of the Valves associated with this Host
*
* @exception Exception if an MBean cannot be created or registered
*/
public String[] getValveNames() throws Exception {
Valve[] valves = this.getPipeline().getValves();
String[] mbeanNames = new String[valves.length];
for (int i = 0; i < valves.length; i++) {
if (valves[i] instanceof JmxEnabled) {
ObjectName oname = ((JmxEnabled) valves[i]).getObjectName();
if (oname != null) {
mbeanNames[i] = oname.toString();
}
}
}
return mbeanNames;
}
use of org.apache.catalina.JmxEnabled in project tomcat by apache.
the class StandardPipeline method getValveObjectNames.
public ObjectName[] getValveObjectNames() {
ArrayList<ObjectName> valveList = new ArrayList<>();
Valve current = first;
if (current == null) {
current = basic;
}
while (current != null) {
if (current instanceof JmxEnabled) {
valveList.add(((JmxEnabled) current).getObjectName());
}
current = current.getNext();
}
return valveList.toArray(new ObjectName[0]);
}
use of org.apache.catalina.JmxEnabled in project tomcat by apache.
the class StandardService method initInternal.
/**
* Invoke a pre-startup initialization. This is used to allow connectors
* to bind to restricted ports under Unix operating environments.
*/
@Override
protected void initInternal() throws LifecycleException {
super.initInternal();
if (engine != null) {
engine.init();
}
// Initialize any Executors
for (Executor executor : findExecutors()) {
if (executor instanceof JmxEnabled) {
((JmxEnabled) executor).setDomain(getDomain());
}
executor.init();
}
// Initialize mapper listener
mapperListener.init();
// Initialize our defined Connectors
synchronized (connectorsLock) {
for (Connector connector : connectors) {
connector.init();
}
}
}
Aggregations