Top Description Fields Constructors Methods
com.sun.star.lib.uno.environments.remote

public Class JavaThreadPool

extends Object
implements IThreadPool
Class Inheritance
All Implemented Interfaces
com.sun.star.lib.uno.environments.remote.IThreadPool

This class implements a java thread pool.
Since
UDK1.0
See Also
com.sun.star.uno.UnoRuntime, com.sun.star.lib.uno.environments.remote.NativeThreadPool, com.sun.star.lib.uno.environments.remote.IThreadPool, com.sun.star.lib.uno.environments.remote.Job, com.sun.star.lib.uno.environments.remote.JobQueue

Field Summary

Modifier and TypeField and Description
pack-priv JavaThreadPoolFactory
private static final boolean
DEBUG

When set to true, enables various debugging output.

Constructor Summary

AccessConstructor and Description
pack-priv
JavaThreadPool(JavaThreadPoolFactory javaThreadPoolFactory)

Method Summary

Modifier and TypeMethod and Description
public Object
attach(ThreadId threadId)

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.attach.

As above, but hands in an already existing instance of the threadid of the current thread.

public void
attach()

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.attach.

Attaches this thread to the thread pool.

public void
destroy()

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.destroy.

Destroys the thread pool and tries to join all created threads immediately.

public void
detach(Object handle, ThreadId id)

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.detach.

As above, but hands in an already existing instance of the threadid of the current thread and a handle returned by attach.

public void
detach()

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.detach.

Detaches this thread from the thread pool.

public void
dispose(Throwable throwable)

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.dispose.

Disposes this thread pool, thus releasing all threads by throwing a DisposedException with the given Throwable cause.

public Object
enter()

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.enter.

Lets this thread enter the thread pool.

public Object
enter(Object handle, ThreadId threadId)

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.enter.

As above but hands in an already existing instance of the threadid of the current thread and a handle returned by attach.

public ThreadId
getThreadId()

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.getThreadId.

Retrieves the global threadId for the current thread.

public void
putJob(Job job)

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.putJob.

Queues a job into the jobQueue of the thread belonging to the jobs threadId.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_javaThreadPoolFactoryback to summary
pack-priv JavaThreadPoolFactory _javaThreadPoolFactory
DEBUGback to summary
private static final boolean DEBUG

When set to true, enables various debugging output.

Constructor Detail

JavaThreadPoolback to summary
pack-priv JavaThreadPool(JavaThreadPoolFactory javaThreadPoolFactory)

Method Detail

attachback to summary
public Object attach(ThreadId threadId)

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.attach.

Doc from com.sun.star.lib.uno.environments.remote.IThreadPool.attach.

As above, but hands in an already existing instance of the threadid of the current thread.

The function exists for performance.

attachback to summary
public void attach()

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.attach.

Doc from com.sun.star.lib.uno.environments.remote.IThreadPool.attach.

Attaches this thread to the thread pool.

destroyback to summary
public void destroy()

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.destroy.

Doc from com.sun.star.lib.uno.environments.remote.IThreadPool.destroy.

Destroys the thread pool and tries to join all created threads immediately.

detachback to summary
public void detach(Object handle, ThreadId id)

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.detach.

Doc from com.sun.star.lib.uno.environments.remote.IThreadPool.detach.

As above, but hands in an already existing instance of the threadid of the current thread and a handle returned by attach.

The function exists for performance.

detachback to summary
public void detach()

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.detach.

Doc from com.sun.star.lib.uno.environments.remote.IThreadPool.detach.

Detaches this thread from the thread pool.

disposeback to summary
public void dispose(Throwable throwable)

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.dispose.

Doc from com.sun.star.lib.uno.environments.remote.IThreadPool.dispose.

Disposes this thread pool, thus releasing all threads by throwing a DisposedException with the given Throwable cause.

enterback to summary
public Object enter() throws Throwable

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.enter.

Doc from com.sun.star.lib.uno.environments.remote.IThreadPool.enter.

Lets this thread enter the thread pool.

This thread then executes all jobs put via putJob until a reply job arrives.

enterback to summary
public Object enter(Object handle, ThreadId threadId) throws Throwable

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.enter.

Doc from com.sun.star.lib.uno.environments.remote.IThreadPool.enter.

As above but hands in an already existing instance of the threadid of the current thread and a handle returned by attach.

This thread then executes all jobs put via putJob until a reply job arrives.

getThreadIdback to summary
public ThreadId getThreadId()

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.getThreadId.

Doc from com.sun.star.lib.uno.environments.remote.IThreadPool.getThreadId.

Retrieves the global threadId for the current thread.

putJobback to summary
public void putJob(Job job)

Implements com.sun.star.lib.uno.environments.remote.IThreadPool.putJob.

Doc from com.sun.star.lib.uno.environments.remote.IThreadPool.putJob.

Queues a job into the jobQueue of the thread belonging to the jobs threadId.