Package org.eclipse.m2m.atl.debug.core.adwp

# Class ADWP

java.lang.Object
java.lang.Thread
org.eclipse.m2m.atl.debug.core.adwp.ADWP

All Implemented Interfaces:
  `Runnable`

Direct Known Subclasses:
  `ADWPDebuggee`, `ADWPDebuggee`, `ADWPDebugger`

public abstract class ADWP extends Thread
ATL Debug Wire Protocol: declarations for ATL VM debugging protocol. Debugger and debuggee share most protocol code.

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Thread

`Thread.State, Thread.UncaughtExceptionHandler`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CMD_CALL`
Call.
`static final int`
`CMD_CONTINUE`
Continues.
`static final int`
`CMD_DISASSEMBLE`
Disassemble.
`static final int`
`CMD_FINISH`
Finish.
`static final int`
`CMD_GET`
Get.
`static final int`
`CMD_QUERY`
Query.
`static final int`
`CMD_SET`
Set.
`static final int`
`CMD_SET_BP`
Set breakpoint.
`static final int`
`CMD_STEP`
Step.
`static final int`
`CMD_STEP_OVER`
Step over.
`static final int`
`CMD_UNSET_BP`
Unset breakpoint.
`protected DataInputStream`
`in`
`static final int`
`MSG_ANS`
Answer.
`static final int`
`MSG_DISAS_CODE`
Disassemble.
`static final int`
`MSG_STOPPED`
Stopped.
`static final int`
`MSG_TERMINATED`
Terminated.
`protected DataOutputStream`
`out`
`static final int`
`TYPE_BOOLEAN`
`BooleanValue`.
`static final int`
`TYPE_INTEGER`
`IntegerValue`.
`static final int`
`TYPE_NULL`
`NullValue`.
`static final int`
`TYPE_OBJECT`
Object.
`static final int`
`TYPE_REAL`
`RealValue`.
`static final int`
`TYPE_STRING`
`StringValue`.

### Fields inherited from class java.lang.Thread

`MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

## Constructor Summary

Constructors
Constructor
Description
`ADWP(InputStream in, OutputStream out)`
Creates the protocol using the given streams.

## Method Summary

Modifier and Type
Method
Description
`ADWPCommand`
`readCommand()`
Reads a command.
`protected abstract ObjectReference`
`readObjectReference(int id)`
Reads an object reference.
`protected Value`
`readValue()`
Reads a value from the input stream.
`void`
`run()`
`void`
`sendMessage(int msg, int ack, List<Value> args)`
Sends a message.
`protected void`
`writeValue(Value value)`
Writes the given value on the output stream.

### Methods inherited from class java.lang.Thread

`activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### CMD_CONTINUE

public static final int CMD_CONTINUE
Continues.

See Also:
  - Constant Field Values

### CMD_STEP

public static final int CMD_STEP
Step.

See Also:
  - Constant Field Values

### CMD_STEP_OVER

public static final int CMD_STEP_OVER
Step over.

See Also:
  - Constant Field Values

### CMD_FINISH

public static final int CMD_FINISH
Finish.

See Also:
  - Constant Field Values

### CMD_GET

public static final int CMD_GET
Get.

See Also:
  - Constant Field Values

### CMD_SET

public static final int CMD_SET
Set.

See Also:
  - Constant Field Values

### CMD_CALL

public static final int CMD_CALL
Call.

See Also:
  - Constant Field Values

### CMD_SET_BP

public static final int CMD_SET_BP
Set breakpoint.

See Also:
  - Constant Field Values

### CMD_UNSET_BP

public static final int CMD_UNSET_BP
Unset breakpoint.

See Also:
  - Constant Field Values

### CMD_DISASSEMBLE

public static final int CMD_DISASSEMBLE
Disassemble.

See Also:
  - Constant Field Values

### CMD_QUERY

public static final int CMD_QUERY
Query.

See Also:
  - Constant Field Values

### MSG_STOPPED

public static final int MSG_STOPPED
Stopped.

See Also:
  - Constant Field Values

### MSG_ANS

public static final int MSG_ANS
Answer.

See Also:
  - Constant Field Values

### MSG_DISAS_CODE

public static final int MSG_DISAS_CODE
Disassemble.

See Also:
  - Constant Field Values

### MSG_TERMINATED

public static final int MSG_TERMINATED
Terminated.

See Also:
  - Constant Field Values

### TYPE_BOOLEAN

public static final int TYPE_BOOLEAN
`BooleanValue`.

See Also:
  - Constant Field Values

### TYPE_INTEGER

public static final int TYPE_INTEGER
`IntegerValue`.

See Also:
  - Constant Field Values

### TYPE_STRING

public static final int TYPE_STRING
`StringValue`.

See Also:
  - Constant Field Values

### TYPE_OBJECT

public static final int TYPE_OBJECT
Object.

See Also:
  - Constant Field Values

### TYPE_NULL

public static final int TYPE_NULL
`NullValue`.

See Also:
  - Constant Field Values

### TYPE_REAL

public static final int TYPE_REAL
`RealValue`.

See Also:
  - Constant Field Values

### in

protected DataInputStream in

### out

protected DataOutputStream out

## Constructor Details

### ADWP

public ADWP(InputStream in, OutputStream out)
Creates the protocol using the given streams.

Parameters:
  `in` - the input stream
  `out` - the output stream

## Method Details

### writeValue

protected void writeValue(Value value) throws IOException
Writes the given value on the output stream.

Parameters:
  `value` - the value to write
Throws:
  `IOException`

### readValue

protected Value readValue() throws IOException
Reads a value from the input stream.

Returns:
  the value.
Throws:
  `IOException`

### readObjectReference

protected abstract ObjectReference readObjectReference(int id)
Reads an object reference.

Parameters:
  `id` - the object id
Returns:
  the `ObjectReference`

### sendMessage

public void sendMessage(int msg, int ack, List<Value> args)
Sends a message.

Parameters:
  `msg` - the message
  `ack` - the ack
  `args` - the value arguments

### readCommand

public ADWPCommand readCommand()
Reads a command.

Returns:
  the command

### run

public void run()

Specified by:
  `run` in interface `Runnable`
Overrides:
  `run` in class `Thread`
See Also:
  - `Thread.run()`