类 HeapdumpMvcEndpoint
- java.lang.Object
- org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
- org.springframework.boot.actuate.endpoint.mvc.AbstractMvcEndpoint
- org.springframework.boot.actuate.endpoint.mvc.AbstractNamedMvcEndpoint
- org.springframework.boot.actuate.endpoint.mvc.HeapdumpMvcEndpoint
- 所有已实现的接口:
org.springframework.beans.factory.Aware
,MvcEndpoint
,NamedMvcEndpoint
,org.springframework.context.EnvironmentAware
,org.springframework.web.servlet.config.annotation.WebMvcConfigurer
@ConfigurationProperties(prefix="endpoints.heapdump") @HypermediaDisabled public class HeapdumpMvcEndpoint extends AbstractNamedMvcEndpoint
MvcEndpoint
to expose heap dumps.- 从以下版本开始:
- 1.4.0
嵌套类概要
嵌套类 修饰符和类型 类 说明 protected static interface
HeapdumpMvcEndpoint.HeapDumper
Strategy interface used to dump the heap to a file.protected static class
HeapdumpMvcEndpoint.HeapDumperUnavailableException
Exception to be thrown if theHeapdumpMvcEndpoint.HeapDumper
cannot be created.protected static class
HeapdumpMvcEndpoint.HotSpotDiagnosticMXBeanHeapDumper
HeapdumpMvcEndpoint.HeapDumper
that usescom.sun.management.HotSpotDiagnosticMXBean
available on Oracle and OpenJDK to dump the heap to a file.
字段概要
从接口继承的字段 org.springframework.boot.actuate.endpoint.mvc.MvcEndpoint
DISABLED_RESPONSE
构造器概要
构造器 限定符 构造器 说明 HeapdumpMvcEndpoint()
protected
HeapdumpMvcEndpoint(long timeout)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected HeapdumpMvcEndpoint.HeapDumper
createHeapDumper()
Factory method used to create theHeapdumpMvcEndpoint.HeapDumper
.protected void
handle(File heapDumpFile, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Handle the heap dump file and respond.void
invoke(boolean live, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
从类继承的方法 org.springframework.boot.actuate.endpoint.mvc.AbstractNamedMvcEndpoint
getName
从类继承的方法 org.springframework.boot.actuate.endpoint.mvc.AbstractMvcEndpoint
getEndpointType, getEnvironment, getPath, isEnabled, isSensitive, setEnabled, setEnvironment, setPath, setSensitive
从类继承的方法 org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
addArgumentResolvers, addCorsMappings, addFormatters, addInterceptors, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 org.springframework.boot.actuate.endpoint.mvc.MvcEndpoint
getEndpointType, getPath, isSensitive
构造器详细资料
HeapdumpMvcEndpoint
public HeapdumpMvcEndpoint()
HeapdumpMvcEndpoint
protected HeapdumpMvcEndpoint(long timeout)
方法详细资料
invoke
@RequestMapping(method=GET, produces="application/octet-stream") public void invoke(@RequestParam(defaultValue="true") boolean live, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
- 抛出:
IOException
javax.servlet.ServletException
createHeapDumper
protected HeapdumpMvcEndpoint.HeapDumper createHeapDumper() throws HeapdumpMvcEndpoint.HeapDumperUnavailableException
Factory method used to create theHeapdumpMvcEndpoint.HeapDumper
.- 返回:
- the heap dumper to use
- 抛出:
HeapdumpMvcEndpoint.HeapDumperUnavailableException
- if the heap dumper cannot be created
handle
protected void handle(File heapDumpFile, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
Handle the heap dump file and respond. By default this method will return the response as a GZip stream.- 参数:
heapDumpFile
- the generated dump filerequest
- the HTTP requestresponse
- the HTTP response- 抛出:
javax.servlet.ServletException
- on servlet errorIOException
- on IO error