MonitorContendedEnteredEvent (Java SE 26 & JDK 26)
Description: declaration: module: jdk.jdi, package: com.sun.jdi.event, interface: MonitorContendedEnteredEvent
Keywords: com.sun.jdi.event.MonitorContendedEnteredEvent interface

# Interface MonitorContendedEnteredEvent

All Superinterfaces:
  `Event, Locatable, LocatableEvent, Mirror`

public interface MonitorContendedEnteredEvent extends LocatableEvent
Notification that a thread in the target VM is entering a monitor after waiting for it to be released by another thread.

Since:
  1.6
See Also:
  - `EventQueue`
  - `MonitorContendedEnterEvent`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ObjectReference`
  `monitor()`
  Returns the monitor that was entered.
  `ThreadReference`
  `thread()`
  Returns the thread in which this event has occurred.

  ### Methods declared in interface Event

  `request`
  Modifier and Type
  Method
  Description
  `EventRequest`
  `request()`

  ### Methods declared in interface Locatable

  `location`
  Modifier and Type
  Method
  Description
  `Location`
  `location()`
  Returns the `Location` of this mirror, if there is executable code associated with it.

  ### Methods declared in interface Mirror

  `toString, virtualMachine`
  Modifier and Type
  Method
  Description
  `String`
  `toString()`
  Returns a String describing this mirror
  `VirtualMachine`
  `virtualMachine()`
  Gets the VirtualMachine to which this Mirror belongs.

- ## Method Details

  - ### thread

    ThreadReference thread()
    Returns the thread in which this event has occurred.
    Specified by:
      `thread` in interface `LocatableEvent`
    Returns:
      a `ThreadReference` which mirrors the event's thread in the target VM.

  - ### monitor

    ObjectReference monitor()
    Returns the monitor that was entered.
    Returns:
      an `ObjectReference` for the monitor.