javax.tools.diagnostics.vm
Class DumpFactory

java.lang.Object
  extended by javax.tools.diagnostics.vm.DumpFactory

public class DumpFactory
extends java.lang.Object

Standard mechanism that allows a java application to trigger a dump for the executing JVM.


Constructor Summary
DumpFactory()
          Instantiate a dump factory that can be used to trigger dumps
 
Method Summary
 DumpHandle createDumpHandle()
          Returns a Dump handle for the default dump type used by this JVM
 DumpHandle createDumpHandle(DumpDescriptor desc)
          Returns a Dump handle for a dump type that can support the data requested.
 void dump()
          Fastpath method allowing the user to trigger a dump using the default dump method
 void dump(DumpDescriptor desc)
          Fastpath method to create a dump from a dump type that can support the data requested.
 void dump(java.lang.String id)
          Fastpath method allowing the user to trigger a standard dump for the given data format
 java.util.Collection<DumpInitiatorDelegate> getAvailableInitiators()
          Returns the set of available Initiators.
static DumpFactory getDefault()
          Get the default Dump factory.
 DumpInitiatorDelegate getDefaultInitiatorDelegate()
          Get the default dump initiator
 DumpInitiatorDelegate getInitiator(java.lang.String format)
          Returns an initiator that can produce a dump of the required format.
 DumpInitiatorDelegate instantiateOverrideDelegate()
          Instantiates a Dump delegate class to handle dump requests based on the presence of the override system property initiatorPropertyName It will be used in preference to any other auto discovered delegates.
 void loadStandardInitiators()
          Looks for commonly available dump initiators and add them to this instances configuration
 void setDefaultInitiatorDelegate(DumpInitiatorDelegate defaultInitiatorDelegate)
          sets the default dump initiator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DumpFactory

public DumpFactory()
Instantiate a dump factory that can be used to trigger dumps

Method Detail

getDefaultInitiatorDelegate

public DumpInitiatorDelegate getDefaultInitiatorDelegate()
Get the default dump initiator

Returns:

setDefaultInitiatorDelegate

public void setDefaultInitiatorDelegate(DumpInitiatorDelegate defaultInitiatorDelegate)
sets the default dump initiator.

Parameters:
defaultInitiatorDelegate -

dump

public void dump()
          throws java.io.IOException
Fastpath method allowing the user to trigger a dump using the default dump method

Throws:
java.io.IOException

dump

public void dump(java.lang.String id)
          throws java.io.IOException
Fastpath method allowing the user to trigger a standard dump for the given data format

Throws:
java.io.IOException

dump

public void dump(DumpDescriptor desc)
          throws java.io.IOException
Fastpath method to create a dump from a dump type that can support the data requested.

Throws:
java.io.IOException

getDefault

public static DumpFactory getDefault()
Get the default Dump factory. Returns a Dump factory populated with all available dump initiators

Returns:
default dump factory

loadStandardInitiators

public void loadStandardInitiators()
Looks for commonly available dump initiators and add them to this instances configuration


createDumpHandle

public DumpHandle createDumpHandle()
Returns a Dump handle for the default dump type used by this JVM

Returns:
a valid dump handle

createDumpHandle

public DumpHandle createDumpHandle(DumpDescriptor desc)
Returns a Dump handle for a dump type that can support the data requested.

Returns:
a valid dump handle

getInitiator

public DumpInitiatorDelegate getInitiator(java.lang.String format)
Returns an initiator that can produce a dump of the required format. If no initiator exists which can handle the format then null is returned

Parameters:
format -
Returns:
supporting initiator or null

getAvailableInitiators

public java.util.Collection<DumpInitiatorDelegate> getAvailableInitiators()
Returns the set of available Initiators. Always returns a set.

Returns:

instantiateOverrideDelegate

public DumpInitiatorDelegate instantiateOverrideDelegate()
Instantiates a Dump delegate class to handle dump requests based on the presence of the override system property initiatorPropertyName It will be used in preference to any other auto discovered delegates. If the override does not exist or cannot be instantiated then null is returned

Returns:
override delegate instance


Copyright © 2010. All Rights Reserved.