Oracle Java Wireless Client

com.sun.ams
Interface TaskInfo


public interface TaskInfo

Task descriptor interface.


Field Summary
static int DESTROYED
          The task was destroyed and the descriptor is invalid.
static int EXIT_FATAL_ERROR
          The fatal error has occured during the task execution.
static int EXIT_REGULAR
          The task has finished its execution without errors.
static int EXIT_TERMINATED
          The task has been terminated.
static int MAX_PRIORITY
          The maximum priority that a task can have.
static int MIN_PRIORITY
          The minimum priority that a task can have.
static int NORM_PRIORITY
          The default priority that is assigned to a task.
static int PAUSED
          The task is paused.
static int RUNNING
          The task is running.
static int STARTING
          The task is starting up.
 
Method Summary
 java.lang.String getClassName()
          Returns a name of the entry class.
 int getHeapUse()
          Returns heap use of given task
 int getPriority()
          Returns priority of given task
 int getStatus()
          Returns task current status
 SuiteInfo getSuiteInfo()
          Returns suite information this task executed from.
 boolean pauseTask()
          Pauses given task.
 boolean resumeTask()
          Resumes given task.
 boolean setForegroundTask()
          Assigned foreground task.
 boolean setPriority(int priority)
          Changes priority for given task
 boolean stopTask()
          Stops given task.
 

Field Detail

STARTING

static final int STARTING
The task is starting up.

See Also:
Constant Field Values

RUNNING

static final int RUNNING
The task is running. This state is entered from the PAUSED state.

See Also:
Constant Field Values

PAUSED

static final int PAUSED
The task is paused. This state is initial state of the initialized task. Also it can be entered from the RUNNING state.

See Also:
Constant Field Values

DESTROYED

static final int DESTROYED
The task was destroyed and the descriptor is invalid. This state is only entered once. It can be entered either from PAUSED state or from RUNNING state.

See Also:
Constant Field Values

MIN_PRIORITY

static final int MIN_PRIORITY
The minimum priority that a task can have.

See Also:
Constant Field Values

NORM_PRIORITY

static final int NORM_PRIORITY
The default priority that is assigned to a task.

See Also:
Constant Field Values

MAX_PRIORITY

static final int MAX_PRIORITY
The maximum priority that a task can have.

See Also:
Constant Field Values

EXIT_REGULAR

static final int EXIT_REGULAR
The task has finished its execution without errors.

See Also:
Constant Field Values

EXIT_FATAL_ERROR

static final int EXIT_FATAL_ERROR
The fatal error has occured during the task execution.

See Also:
Constant Field Values

EXIT_TERMINATED

static final int EXIT_TERMINATED
The task has been terminated.

See Also:
Constant Field Values
Method Detail

stopTask

boolean stopTask()
Stops given task.

Returns:
true if the task was destroyed

pauseTask

boolean pauseTask()
Pauses given task.

Returns:
true if the task was paused

resumeTask

boolean resumeTask()
Resumes given task.

Returns:
true if the task was resumed

setForegroundTask

boolean setForegroundTask()
Assigned foreground task.

Returns:
true if task was assigned as foreground

setPriority

boolean setPriority(int priority)
                    throws java.lang.IllegalArgumentException
Changes priority for given task

Parameters:
priority - new priority
Returns:
true if priority was changed successfully
Throws:
java.lang.IllegalArgumentException - - If the priority is not in the range MIN_PRIORITY to MAX_PRIORITY.

getPriority

int getPriority()
Returns priority of given task

Returns:
task priority or negative value if given task descriptor is invalid.

getHeapUse

int getHeapUse()
Returns heap use of given task

Returns:
task heap use or negative value if given task descriptor is invalid.

getStatus

int getStatus()
Returns task current status

Returns:
one of the follwoing constans: STARTING, RUNNING, PAUSED, DESTROYED

getClassName

java.lang.String getClassName()
Returns a name of the entry class.

Returns:
startup class of this task

getSuiteInfo

SuiteInfo getSuiteInfo()
Returns suite information this task executed from.

Returns:
AppSuite this task belongs to.

Oracle Java Wireless Client

Copyright (c) 1990, 2012, Oracle and/or its affiliates. All rights reserved.