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

public Interface IThreadPool

Known Direct Implementers
com.sun.star.lib.uno.environments.remote.NativeThreadPool, com.sun.star.lib.uno.environments.remote.JavaThreadPool

This interface is an abstraction of the various threadpool implementations.
Since
UDK1.0
See Also
com.sun.star.lib.uno.environments.remote.ThreadPoolManager

Method Summary

Modifier and TypeMethod and Description
public void
attach()

Attaches this thread to the thread pool.

public Object

Returns:

Returns a handle which can be used in enter and detach calls.
attach
(ThreadId id)

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

public void
destroy()

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

public void
detach()

Detaches this thread from the thread pool.

public void
detach(Object handle, ThreadId id)

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

public void
dispose(Throwable
the cause
throwable
)

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

public Object
enter()

Lets this thread enter the thread pool.

public Object
enter(Object handle, ThreadId id)

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

public ThreadId

Returns:

the thread id.
getThreadId
()

Retrieves the global threadId for the current thread.

public void
putJob(Job
the job
job
)

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

Method Detail

attachback to summary
public void attach()

Attaches this thread to the thread pool.

See Also
enter
attachback to summary
public Object attach(ThreadId id)

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

The function exists for performance.

Returns:Object

Returns a handle which can be used in enter and detach calls.

See Also
attach
destroyback to summary
public void destroy()

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

detachback to summary
public void detach()

Detaches this thread from the thread pool.

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

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.

See Also
attach(), detach()
disposeback to summary
public void dispose(Throwable throwable)

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

Parameters
throwable:Throwable

the cause

enterback to summary
public Object enter() throws Throwable

Lets this thread enter the thread pool.

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

See Also
putJob
enterback to summary
public Object enter(Object handle, ThreadId id) throws Throwable

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.

See Also
putJob
getThreadIdback to summary
public ThreadId getThreadId()

Retrieves the global threadId for the current thread.

Returns:ThreadId

the thread id.

putJobback to summary
public void putJob(Job job)

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

Parameters
job:Job

the job