Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## chrriis.dj.nativeswing.swtimpl
Class CommandMessage

    java.lang.Object
      chrriis.dj.nativeswing.swtimpl.Message
          chrriis.dj.nativeswing.swtimpl.CommandMessage

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  ControlCommandMessage, LocalMessage

    public abstract class CommandMessage

extends Message

A type of message that executes a command with optional arguments and returns a result.

Author:
  Christopher Deckers
See Also:
  Serialized Form

Constructor Summary
`CommandMessage()` Construct a command message.

Method Summary
`void` | `asyncExec(boolean isTargetNativeSide, Object... args)` Execute that message asynchronously with the given arguments.
`abstract Object` | `run(Object[] args)` Run the message.
`Object` | `syncExec(boolean isTargetNativeSide, Object... args)` Execute that message synchronously with the given arguments and return the result.
`String` | `toString()`

Methods inherited from class chrriis.dj.nativeswing.swtimpl.Message
`asyncSend, isValid, syncSend`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CommandMessage

    public CommandMessage()

  Construct a command message.

Method Detail

### asyncExec

    public void asyncExec(boolean isTargetNativeSide,
                          Object... args)

  Execute that message asynchronously with the given arguments.

  Parameters:
    `isTargetNativeSide` - true if the target is the native side, false otherwise.
    `args` - the arguments, which must be serializable.

### syncExec

    public Object syncExec(boolean isTargetNativeSide,
                           Object... args)

  Execute that message synchronously with the given arguments and return the result.

  Parameters:
    `isTargetNativeSide` - true if the target is the native side, false otherwise.
    `args` - the arguments, which must be serializable.
  Returns:
    the result of the execution.

### run

    public abstract Object run(Object[] args)
                        throws Exception

  Run the message.

  Parameters:
    `args` - the arguments that were specified for that command, or an empty array if none were specified.
  Returns:
    the result that may be passed back to the caller.
  Throws:
    `Exception` - any exception that may happen, and which would be passed back if it is a synchronous execution.

### toString

    public String toString()

  Overrides:
    `toString` in class `Message`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD