You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kato-commits@incubator.apache.org by sp...@apache.org on 2009/12/22 22:57:55 UTC
svn commit: r893336 -
/incubator/kato/trunk/org.apache.kato/kato.api.vm/src/main/java/javax/tools/diagnostics/vm/spi/delegates/JavaDumpDelegate.java
Author: spoole
Date: Tue Dec 22 22:57:55 2009
New Revision: 893336
URL: http://svn.apache.org/viewvc?rev=893336&view=rev
Log:
added missing licence files to new Java code
Added:
incubator/kato/trunk/org.apache.kato/kato.api.vm/src/main/java/javax/tools/diagnostics/vm/spi/delegates/JavaDumpDelegate.java
Added: incubator/kato/trunk/org.apache.kato/kato.api.vm/src/main/java/javax/tools/diagnostics/vm/spi/delegates/JavaDumpDelegate.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api.vm/src/main/java/javax/tools/diagnostics/vm/spi/delegates/JavaDumpDelegate.java?rev=893336&view=auto
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api.vm/src/main/java/javax/tools/diagnostics/vm/spi/delegates/JavaDumpDelegate.java (added)
+++ incubator/kato/trunk/org.apache.kato/kato.api.vm/src/main/java/javax/tools/diagnostics/vm/spi/delegates/JavaDumpDelegate.java Tue Dec 22 22:57:55 2009
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package javax.tools.diagnostics.vm.spi.delegates;
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.tools.diagnostics.vm.DumpDescriptor;
+import javax.tools.diagnostics.vm.DumpHandle;
+import javax.tools.diagnostics.vm.DumpInitiatorDelegate;
+import javax.tools.diagnostics.vm.spi.DumpInitiatorCapabilities;
+
+public class JavaDumpDelegate implements DumpInitiatorDelegate {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.tools.diagnostics.vm.DumpInitiatorDelegate#dump()
+ */
+
+ private boolean createDump() throws IOException {
+
+ File dumpFile=new File("dump.kato");
+ return dumpFile.createNewFile();
+
+
+ }
+
+ public boolean available() {
+ return true;
+ }
+
+ @Override
+ public DumpHandle createDumpHandle() {
+ return new DumpHandle() {
+
+ @Override
+ public boolean dump() throws IOException {
+ return createDump();
+ }
+ };
+ }
+
+ @Override
+ public DumpHandle createDumpHandle(DumpDescriptor descriptor) {
+ return new DumpHandle() {
+
+ @Override
+ public boolean dump() throws IOException {
+ return createDump();
+ }
+ };
+ }
+
+ @Override
+ public DumpInitiatorCapabilities getCapabilities() {
+ return new DumpInitiatorCapabilities() {
+ };
+ }
+
+ @Override
+ public String getDumpType() {
+ return "dump.kato";
+ }
+}
\ No newline at end of file