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

## lbg.resource.execution
Class LiveTaskExecutionHandler

    java.lang.Object
      lbg.resource.execution.LiveTaskExecutionHandler

All Implemented Interfaces:
  java.lang.Runnable

    public class LiveTaskExecutionHandler

extends java.lang.Object
implements java.lang.Runnable

A wrapper over GridApplications to allow better control and automatic TaskOutput generation when an app ends.
Related logger: lbg.resource

Author:
  Xavier Dalem, Cyril Briquet

Constructor Summary
`LiveTaskExecutionHandler(LiveResource res, InternalPeerHandle iph, Task t, int mem_size)` Readies a handler to be started as a different Thread.

Method Summary
`void` | `abort()` Stops the managed task.
`void` | `run()` Start handling the task.
`java.lang.String` | `toString()`

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

Constructor Detail

### LiveTaskExecutionHandler

    public LiveTaskExecutionHandler(LiveResource res,
                                    InternalPeerHandle iph,
                                    Task t,
                                    int mem_size)
                             throws GridException

  Readies a handler to be started as a different Thread. The thread isn't started automatically (and the Task doesn't run until is starts).

  Parameters:
    `res` - owner Resource
    `t` - Task to run
    `iph` - handle to the owner Peer
    `mem_size` - memory to allocate to the Task execution (expressed as a number of megabytes)
  Throws:
    `GridException`

Method Detail

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### run

    public void run()

  Start handling the task.

  Specified by:
    `run` in interface `java.lang.Runnable`

### abort

    public void abort()

  Stops the managed task. Instantly kills the target thread and any thread ran by it. The resource should be reported as idle prior to calling this.

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

> Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.