Java 类org.hibernate.service.spi.Startable 实例源码

项目:lams    文件:AbstractServiceRegistryImpl.java   
@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()
        );
    }
}