本文整理汇总了Java中org.springframework.boot.loader.jar.Handler.setUseFastConnectionExceptions方法的典型用法代码示例。如果您正苦于以下问题:Java Handler.setUseFastConnectionExceptions方法的具体用法?Java Handler.setUseFastConnectionExceptions怎么用?Java Handler.setUseFastConnectionExceptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.boot.loader.jar.Handler
的用法示例。
在下文中一共展示了Handler.setUseFastConnectionExceptions方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadClass
import org.springframework.boot.loader.jar.Handler; //导入方法依赖的package包/类
@Override
protected Class<?> loadClass(String name, boolean resolve)
throws ClassNotFoundException {
Handler.setUseFastConnectionExceptions(true);
try {
try {
definePackageIfNecessary(name);
}
catch (IllegalArgumentException ex) {
// Tolerate race condition due to being parallel capable
if (getPackage(name) == null) {
// This should never happen as the IllegalArgumentException indicates
// that the package has already been defined and, therefore,
// getPackage(name) should not return null.
throw new AssertionError("Package " + name + " has already been "
+ "defined but it could not be found");
}
}
return super.loadClass(name, resolve);
}
finally {
Handler.setUseFastConnectionExceptions(false);
}
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:25,代码来源:LaunchedURLClassLoader.java
示例2: loadClass
import org.springframework.boot.loader.jar.Handler; //导入方法依赖的package包/类
/**
* Attempt to load classes from the URLs before delegating to the parent loader.
*/
@Override
protected Class<?> loadClass(String name, boolean resolve)
throws ClassNotFoundException {
synchronized (LaunchedURLClassLoader.LOCK_PROVIDER.getLock(this, name)) {
Class<?> loadedClass = findLoadedClass(name);
if (loadedClass == null) {
Handler.setUseFastConnectionExceptions(true);
try {
loadedClass = doLoadClass(name);
}
finally {
Handler.setUseFastConnectionExceptions(false);
}
}
if (resolve) {
resolveClass(loadedClass);
}
return loadedClass;
}
}
示例3: findResource
import org.springframework.boot.loader.jar.Handler; //导入方法依赖的package包/类
@Override
public URL findResource(String name) {
Handler.setUseFastConnectionExceptions(true);
try {
return super.findResource(name);
}
finally {
Handler.setUseFastConnectionExceptions(false);
}
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:11,代码来源:LaunchedURLClassLoader.java
示例4: findResources
import org.springframework.boot.loader.jar.Handler; //导入方法依赖的package包/类
@Override
public Enumeration<URL> findResources(String name) throws IOException {
Handler.setUseFastConnectionExceptions(true);
try {
return super.findResources(name);
}
finally {
Handler.setUseFastConnectionExceptions(false);
}
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:11,代码来源:LaunchedURLClassLoader.java
示例5: hasMoreElements
import org.springframework.boot.loader.jar.Handler; //导入方法依赖的package包/类
@Override
public boolean hasMoreElements() {
try {
Handler.setUseFastConnectionExceptions(true);
return this.rootResources.hasMoreElements()
|| this.localResources.hasMoreElements();
}
finally {
Handler.setUseFastConnectionExceptions(false);
}
}