1 11 package org.eclipse.jdi.internal.event; 12 13 import java.io.DataInputStream ; 14 import java.io.IOException ; 15 16 import org.eclipse.jdi.internal.LocationImpl; 17 import org.eclipse.jdi.internal.MirrorImpl; 18 import org.eclipse.jdi.internal.ObjectReferenceImpl; 19 import org.eclipse.jdi.internal.ThreadReferenceImpl; 20 import org.eclipse.jdi.internal.ValueImpl; 21 import org.eclipse.jdi.internal.VirtualMachineImpl; 22 import org.eclipse.jdi.internal.request.RequestID; 23 24 import com.sun.jdi.LongValue; 25 import com.sun.jdi.ObjectReference; 26 import com.sun.jdi.event.MonitorWaitEvent; 27 28 public class MonitorWaitEventImpl extends LocatableEventImpl implements MonitorWaitEvent { 29 30 31 public static final byte EVENT_KIND = EVENT_MONITOR_WAIT; 32 33 34 private long fTimeOut; 35 36 37 private ObjectReference fMonitor; 38 39 40 private MonitorWaitEventImpl(VirtualMachineImpl vmImpl, RequestID requestID) { 41 super("MonitorWait", vmImpl, requestID); } 43 44 47 public static MonitorWaitEventImpl read(MirrorImpl target, RequestID requestID, DataInputStream dataInStream) throws IOException { 48 VirtualMachineImpl vmImpl = target.virtualMachineImpl(); 49 MonitorWaitEventImpl event = new MonitorWaitEventImpl(vmImpl, requestID); 50 event.fThreadRef = ThreadReferenceImpl.read(target, dataInStream); 51 event.fMonitor = ObjectReferenceImpl.readObjectRefWithTag(target, dataInStream); 52 event.fLocation = LocationImpl.read(target, dataInStream); 53 event.fTimeOut = ((LongValue)ValueImpl.readWithTag(target, dataInStream)).value(); 54 return event; 55 } 56 57 60 public ObjectReference monitor() { 61 return fMonitor; 62 } 63 64 67 public long timeout() { 68 return fTimeOut; 69 } 70 } 71 | Popular Tags |