| <?xml version='1.0' encoding='UTF-8'?> | |
| <!-- Schema file written by PDE --> | |
| <schema targetNamespace="org.eclipse.mat.api" xmlns="http://www.w3.org/2001/XMLSchema"> | |
| <annotation> | |
| <appInfo> | |
| <meta.schema plugin="org.eclipse.mat.api" id="requestResolver" name="Request Details Resolver"/> | |
| </appInfo> | |
| <documentation> | |
| <p>The Leak Suspect report tries to display the current activity of a | |
| suspicious thread. For example, a HTTP worker thread used by a web container | |
| usually contains information about the request URL currently processed. | |
| This information is helpful to better understand the current problem.</p> | |
| <p>This is how it works: The heap dump contains information about which | |
| objects are currently on the call stack of a thread (so called "Java Locals"). | |
| If some "HTTP request" object is on the call stack, one can pretty safely | |
| assume that the thread is executing this HTTP request. Of course, this | |
| requires some implementation knowlege and may change from version to | |
| version. The Memory Analyzer checks if a request details resolver is | |
| configured for one of the Java local objects and asks the resolver to | |
| provide a summary and detail page.</p> | |
| </documentation> | |
| </annotation> | |
| <element name="extension"> | |
| <annotation> | |
| <appInfo> | |
| <meta.element /> | |
| </appInfo> | |
| </annotation> | |
| <complexType> | |
| <sequence minOccurs="1" maxOccurs="unbounded"> | |
| <element ref="resolver"/> | |
| </sequence> | |
| <attribute name="point" type="string" use="required"> | |
| <annotation> | |
| <documentation> | |
| </documentation> | |
| </annotation> | |
| </attribute> | |
| <attribute name="id" type="string"> | |
| <annotation> | |
| <documentation> | |
| </documentation> | |
| </annotation> | |
| </attribute> | |
| <attribute name="name" type="string"> | |
| <annotation> | |
| <documentation> | |
| </documentation> | |
| <appInfo> | |
| <meta.attribute translatable="true"/> | |
| </appInfo> | |
| </annotation> | |
| </attribute> | |
| </complexType> | |
| </element> | |
| <element name="resolver"> | |
| <complexType> | |
| <attribute name="impl" type="string" use="required"> | |
| <annotation> | |
| <documentation> | |
| implementor of <a href="org/eclipse/mat/snapshot/extension/IRequestDetailsResolver.html"><samp>org.eclipse.mat.snapshot.extension.IRequestDetailsResolver</samp></a> annotated with <samp>@Subject</samp> or <samp>@Subjects</samp> | |
| </documentation> | |
| <appInfo> | |
| <meta.attribute kind="java" basedOn=":org.eclipse.mat.snapshot.extension.IRequestDetailsResolver"/> | |
| </appInfo> | |
| </annotation> | |
| </attribute> | |
| </complexType> | |
| </element> | |
| <annotation> | |
| <appInfo> | |
| <meta.section type="since"/> | |
| </appInfo> | |
| <documentation> | |
| 0.7.0 | |
| </documentation> | |
| </annotation> | |
| <annotation> | |
| <appInfo> | |
| <meta.section type="examples"/> | |
| </appInfo> | |
| <documentation> | |
| Following is an example of a request resolver declaration: | |
| <p> | |
| <pre> | |
| <extension point="org.eclipse.mat.api.requestResolver"> | |
| <resolver impl="org.eclipse.mat.inspections.jetty.JettyRequestResolver"/> | |
| </extension> | |
| </pre> | |
| </p> | |
| The implemenation could look like this: | |
| <p> | |
| <pre> | |
| @Subject("org.mortbay.jetty.Request") | |
| public class JettyRequestResolver implements IRequestDetailsResolver | |
| { | |
| public void complement(ISnapshot snapshot, | |
| IThreadInfo thread, | |
| int[] javaLocals, | |
| int thisJavaLocal, | |
| IProgressListener listener) | |
| throws SnapshotException | |
| { | |
| IObject httpRequest = snapshot.getObject(thisJavaLocal); | |
| IObject requestURI = (IObject) httpRequest.resolveValue("_requestURI"); | |
| [...] | |
| thread.addRequest(summary, details); | |
| } | |
| </pre> | |
| </p> | |
| The <samp>@Subject</samp> tells the Memory Analyzer, to use this request details | |
| resolver for all instances of type "org.mortbay.jetty.Request". In this | |
| </documentation> | |
| </annotation> | |
| <annotation> | |
| <appInfo> | |
| <meta.section type="implementation"/> | |
| </appInfo> | |
| <documentation> | |
| The Memory Analyzer supplies a sample request details resolver for Jetty: <samp>org.eclipse.mat.inspections.jetty.JettyRequestResolver</samp>. | |
| </documentation> | |
| </annotation> | |
| <annotation> | |
| <appInfo> | |
| <meta.section type="copyright"/> | |
| </appInfo> | |
| <documentation> | |
| Copyright (c) 2008 SAP AG and others.<br> | |
| All rights reserved. This program and the accompanying materials are made | |
| available under the terms of the Eclipse Public License 2.0 which | |
| accompanies this distribution, and is available at | |
| <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a> | |
| </documentation> | |
| </annotation> | |
| <annotation> | |
| <appInfo> | |
| <meta.section type="apiInfo"/> | |
| </appInfo> | |
| <documentation> | |
| The value of the impl attribute must represent an implementor of <a href="org/eclipse/mat/snapshot/extension/IRequestDetailsResolver.html"> <samp>org.eclipse.mat.snapshot.extension.IRequestDetailsResolver</samp></a>. | |
| </documentation> | |
| </annotation> | |
| </schema> |