Java源码示例:org.hibernate.jmx.spi.JmxService

示例1
@Override
public JmxService initiateService(Map configurationValues, ServiceRegistryImplementor registry) {
    if (ConfigurationHelper.getBoolean(AvailableSettings.JMX_ENABLED, configurationValues, false)) {
        Logger.getLogger(DisabledJMXInitiator.class)
                .warn("Enabling JMX is not allowed in Quarkus: forcefully disabled. Ignoring property:"
                        + AvailableSettings.JMX_ENABLED);
    }
    return DisabledJmxServiceImpl.INSTANCE;
}
 
示例2
@Override
@SuppressWarnings({ "unchecked" })
public <R extends Service> void startService(ServiceBinding<R> serviceBinding) {
	if ( Startable.class.isInstance( serviceBinding.getService() ) ) {
		( (Startable) serviceBinding.getService() ).start();
	}

	if ( Manageable.class.isInstance( serviceBinding.getService() ) ) {
		getService( JmxService.class ).registerService(
				(Manageable) serviceBinding.getService(),
				serviceBinding.getServiceRole()
		);
	}
}
 
示例3
@Override
public Class<JmxService> getServiceInitiated() {
    return JmxService.class;
}
 
示例4
@Override
public Class<JmxService> getServiceInitiated() {
	return JmxService.class;
}
 
示例5
@Override
public JmxService initiateService(Map configurationValues, ServiceRegistryImplementor registry) {
	return ConfigurationHelper.getBoolean( AvailableSettings.JMX_ENABLED, configurationValues, false )
			? new JmxServiceImpl( configurationValues )
			: DisabledJmxServiceImpl.INSTANCE;
}