Groovy Documentation

org.codehaus.griffon.runtime.util
[Java] Class AbstractUIThreadWorker

java.lang.Object
  org.codehaus.griffon.runtime.core.AbstractObservable
      org.codehaus.griffon.runtime.util.AbstractUIThreadWorker
All Implemented Interfaces:
UIThreadWorker

public abstract class AbstractUIThreadWorker
extends AbstractObservable

Authors:
Andres Almiray


Field Summary
private static ExecutorService DEFAULT_EXECUTOR_SERVICE

private static String KEY_PROGRESS

private static String KEY_STATE

private FutureTask future

private int progress

private StateValue state

 
Constructor Summary
AbstractUIThreadWorker()

 
Method Summary
private void callDoneInsideUIThread()

boolean cancel(boolean mayInterruptIfRunning)

protected Object doInBackground()

protected void done()

void execute()

Object get()

Object get(long timeout, TimeUnit unit)

int getProgress()

StateValue getState()

boolean isCancelled()

boolean isDone()

protected void process(List chunks)

protected void publish(Object... chunks)

void run()

protected void setProgress(int progress)

private void setState(StateValue state)

 
Methods inherited from class AbstractObservable
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

DEFAULT_EXECUTOR_SERVICE

private static final ExecutorService DEFAULT_EXECUTOR_SERVICE


KEY_PROGRESS

private static final String KEY_PROGRESS


KEY_STATE

private static final String KEY_STATE


future

private final FutureTask future


progress

private int progress


state

private StateValue state


 
Constructor Detail

AbstractUIThreadWorker

public AbstractUIThreadWorker()


 
Method Detail

callDoneInsideUIThread

private void callDoneInsideUIThread()


cancel

public final boolean cancel(boolean mayInterruptIfRunning)


doInBackground

protected Object doInBackground()


done

protected void done()


execute

public final void execute()


get

public final Object get()


get

public final Object get(long timeout, TimeUnit unit)


getProgress

public final int getProgress()


getState

public final StateValue getState()


isCancelled

public final boolean isCancelled()


isDone

public final boolean isDone()


process

protected void process(List chunks)


publish

protected final void publish(Object... chunks)


run

public final void run()


setProgress

protected final void setProgress(int progress)


setState

private void setState(StateValue state)


 

Groovy Documentation