@ConfigurationProperties(value="endpoints.heapdump") @HypermediaDisabled public class HeapdumpMvcEndpoint extends AbstractMvcEndpoint
MvcEndpoint
to expose heap dumps.Modifier and Type | Class and Description |
---|---|
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 the
HeapdumpMvcEndpoint.HeapDumper cannot be created. |
protected static class |
HeapdumpMvcEndpoint.HotSpotDiagnosticMXBeanHeapDumper
HeapdumpMvcEndpoint.HeapDumper that uses com.sun.management.HotSpotDiagnosticMXBean
available on Oracle and OpenJDK to dump the heap to a file. |
DISABLED_RESPONSE
Modifier | Constructor and Description |
---|---|
|
HeapdumpMvcEndpoint() |
protected |
HeapdumpMvcEndpoint(long timeout) |
Modifier and Type | Method and Description |
---|---|
protected HeapdumpMvcEndpoint.HeapDumper |
createHeapDumper()
Factory method used to create the
HeapdumpMvcEndpoint.HeapDumper . |
protected void |
handle(File heapDumpFile,
HttpServletRequest request,
HttpServletResponse response)
Handle the heap dump file and respond.
|
void |
invoke(boolean live,
HttpServletRequest request,
HttpServletResponse response) |
getEndpointType, getEnvironment, getPath, isEnabled, isSensitive, setEnabled, setEnvironment, setPath, setSensitive
addArgumentResolvers, addCorsMappings, addFormatters, addInterceptors, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
public HeapdumpMvcEndpoint()
protected HeapdumpMvcEndpoint(long timeout)
@RequestMapping(method=GET, produces="application/octet-stream") public void invoke(@RequestParam(defaultValue="true") boolean live, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
IOException
ServletException
protected HeapdumpMvcEndpoint.HeapDumper createHeapDumper() throws HeapdumpMvcEndpoint.HeapDumperUnavailableException
HeapdumpMvcEndpoint.HeapDumper
.HeapdumpMvcEndpoint.HeapDumperUnavailableException
- if the heap dumper cannot be createdprotected void handle(File heapDumpFile, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
heapDumpFile
- the generated dump filerequest
- the HTTP requestresponse
- the HTTP responseServletException
- on servlet errorIOException
- on IO errorCopyright © 2017 Pivotal Software, Inc.. All rights reserved.