org.eclipse.wst.jsdt.debug.core.jsdi

## Interface VirtualMachine

    public interface VirtualMachine

Abstract description of a VM. This interface is used to abstract the platform model from the underlying connection / debugger protocol.

Since:
  1.0
Restriction:
  This interface is not intended to be extended by clients.

### Field Summary

Fields
`static int` `DEFAULT_TIMEOUT`

### Method Summary

All Methods Instance Methods Abstract Methods
`java.util.List` `allScripts()` Returns the live list of `ScriptReference`s loaded in the `VirtualMachine` or an empty list.
`java.util.List` `allThreads()` Returns the live list of `ThreadReference`s in the `VirtualMachine` or an empty list.
`boolean` `canUpdateBreakpoints()` Returns if the `VirtualMachine` supports updating existing breakpoints or not
`java.lang.String` `description()` Returns the description of the `VirtualMachine`.
`void` `dispose()` Disposes the `VirtualMachine` and cleans up held objects
`EventQueue` `eventQueue()` Returns the `EventQueue` associated with this `VirtualMachine`.
`EventRequestManager` `eventRequestManager()` Returns the `EventRequestManager` associated with this `VirtualMachine`.
`BooleanValue` `mirrorOf(boolean bool)` Returns a new `BooleanValue`.
`NumberValue` `mirrorOf(java.lang.Number number)` Returns a new `NumberValue`.
`StringValue` `mirrorOf(java.lang.String string)` Returns a `StringValue` initialized to the given `String`.
`NullValue` `mirrorOfNull()` Returns the `NullValue` value.
`UndefinedValue` `mirrorOfUndefined()` Returns the `UndefinedValue` value.
`java.lang.String` `name()` Returns the name of the `VirtualMachine`.
`void` `resume()` Sends a resume request to the VM
`void` `suspend()` Sends a suspend request to the VM
`void` `terminate()` Terminates and disconnects the VM
`void` `updateBreakpoint(IJavaScriptBreakpoint breakpoint)` Update the given `IJavaScriptBreakpoint`
`java.lang.String` `version()` Returns the version string of the `VirtualMachine`.

### Field Detail

#### DEFAULT_TIMEOUT

    static final int DEFAULT_TIMEOUT

See Also:
  Constant Field Values

### Method Detail

#### resume

    void resume()

Sends a resume request to the VM

#### suspend

    void suspend()

Sends a suspend request to the VM

#### terminate

    void terminate()

Terminates and disconnects the VM

#### name

    java.lang.String name()

Returns the name of the `VirtualMachine`.
This method can return `null`

Returns:
  the name of the `VirtualMachine` or `null`

#### description

    java.lang.String description()

Returns the description of the `VirtualMachine`.
This method can return `null`

Returns:
  the description of the `VirtualMachine` or `null`

#### version

    java.lang.String version()

Returns the version string of the `VirtualMachine`.
This method can return `null`

Returns:
  the version string of the `VirtualMachine` or `null`

#### allThreads

    java.util.List allThreads()

Returns the live list of `ThreadReference`s in the `VirtualMachine` or an empty list.
This method cannot return `null`

Returns:
  the live list of `ThreadReference`s in the `VirtualMachine` or an empty list, never `null`

#### allScripts

    java.util.List allScripts()

Returns the live list of `ScriptReference`s loaded in the `VirtualMachine` or an empty list.
This method cannot return `null`

Returns:
  the live list of loaded `ScriptReference`s or an empty list, never `null`

#### dispose

    void dispose()

Disposes the `VirtualMachine` and cleans up held objects

#### mirrorOfUndefined

    UndefinedValue mirrorOfUndefined()

Returns the `UndefinedValue` value.

Returns:
  the `UndefinedValue` value

#### mirrorOfNull

    NullValue mirrorOfNull()

Returns the `NullValue` value.

Returns:
  the `NullValue` value.

#### mirrorOf

    BooleanValue mirrorOf(boolean bool)

Returns a new `BooleanValue`.

Parameters:
  `bool` - the boolean primitive to mirror in the `VirtualMachine`
Returns:
  a new `BooleanValue`

#### mirrorOf

    NumberValue mirrorOf(java.lang.Number number)

Returns a new `NumberValue`.

Parameters:
  `number` - the `Number` to mirror in the `VirtualMachine`
Returns:
  a new `NumberValue`

#### mirrorOf

    StringValue mirrorOf(java.lang.String string)

Returns a `StringValue` initialized to the given `String`.

Parameters:
  `string` - the initial value for the mirrored `StringValue`
Returns:
  a new `StringValue`

#### eventRequestManager

    EventRequestManager eventRequestManager()

Returns the `EventRequestManager` associated with this `VirtualMachine`.
This method can return `null` if the `VirtualMachine` has been disposed or terminated.

Returns:
  the `EventRequestManager` for this `VirtualMachine` or `null`

#### eventQueue

    EventQueue eventQueue()

Returns the `EventQueue` associated with this `VirtualMachine`.
This method can return `null` if the `VirtualMachine` has been disposed or terminated.

Returns:
  the `EventQueue` for this `VirtualMachine` or `null`

#### canUpdateBreakpoints

    boolean canUpdateBreakpoints()

Returns if the `VirtualMachine` supports updating existing breakpoints or not

Returns:
  `true` if this `VirtualMachine` can update existing breakpoints `false` otherwise
Since:
  3.1

#### updateBreakpoint

    void updateBreakpoint(IJavaScriptBreakpoint breakpoint)

Update the given `IJavaScriptBreakpoint`

Parameters:
  `breakpoint` - the breakpoint to update, cannot be `null`
Since:
  3.1