|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread de.bea.domingo.proxy.DNotesThread
public class DNotesThread
The NotesThread class extends java.lang.Thread to include special initialization and termination code for Domino.
This extension to Thread is required to run Java programs that make local calls to the Domino classes, but is not allowed for applications that make remote calls. An application that makes both local and remote calls must determine dynamically when to use the static methods sinitThread and stermThread. This includes threads invoked by AWT that access Domino objects.
To execute threads through the Runnable interface, implement Runnable and include a run method as you would for any class using threads.
To execute threads through inheritance, extend NotesThread instead of Thread and include a runNotes method instead of run.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
DNotesThread()
Allocates a new DNotesThread object. |
|
DNotesThread(java.lang.Runnable theTarget)
Allocates a new DNotesThread object. |
|
DNotesThread(java.lang.Runnable theTarget,
java.lang.String name)
Allocates a new DNotesThread object. |
|
DNotesThread(java.lang.String name)
Allocates a new Thread object. |
|
DNotesThread(java.lang.ThreadGroup group,
java.lang.Runnable theTarget)
Allocates a new DNotesThread object. |
|
DNotesThread(java.lang.ThreadGroup group,
java.lang.Runnable theTarget,
java.lang.String name)
Allocates a new DNotesThread object so that it has
target as its run object, has the specified
name as its name, and belongs to the thread group referred
to by group . |
|
DNotesThread(java.lang.ThreadGroup group,
java.lang.String name)
Allocates a new Thread object. |
Method Summary | |
---|---|
protected void |
finalize()
|
protected void |
initThread()
|
void |
run()
|
void |
runNotes()
Runs a Notes process. |
void |
setMonitor(DNotesMonitor theMonitor)
Set the monitor. |
protected void |
termThread()
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DNotesThread()
DNotesThread
object. This constructor has
the same effect as DNotesThread(null, null,
name)
, where name is
a newly generated name. Automatically generated names are of the
form "Thread-"+
n, where n is an integer.
DNotesThread(ThreadGroup, Runnable, String)
public DNotesThread(java.lang.String name)
Thread
object. This constructor has the
same effect as Thread(null, null, name)
.
name
- the name of the new thread.DNotesThread(ThreadGroup, Runnable, String)
public DNotesThread(java.lang.Runnable theTarget)
DNotesThread
object. This constructor has
the same effect as DNotesThread(null, target,
name)
,
where name is a newly generated name. Automatically generated
names are of the form "Thread-"+
n, where n
is an integer.
theTarget
- the object whose run
method is called.DNotesThread(ThreadGroup, Runnable, String)
public DNotesThread(java.lang.ThreadGroup group, java.lang.Runnable theTarget)
DNotesThread
object. This constructor has
the same effect as DNotesThread(group, target,
name)
,
where name is a newly generated name. Automatically generated
names are of the form "Thread-"+
n, where n
is an integer.
group
- the thread group.theTarget
- the object whose run
method is called.DNotesThread(ThreadGroup, Runnable, String)
public DNotesThread(java.lang.Runnable theTarget, java.lang.String name)
DNotesThread
object. This constructor has
the same effect as DNotesThread(null, target, name)
.
theTarget
- the object whose run
method is called.name
- the name of the new thread.DNotesThread(ThreadGroup, Runnable, String)
public DNotesThread(java.lang.ThreadGroup group, java.lang.String name)
Thread
object. This constructor has the
same effect as Thread(null, target, name)
.
group
- the thread group.name
- the name of the new thread.DNotesThread(ThreadGroup, Runnable, String)
public DNotesThread(java.lang.ThreadGroup group, java.lang.Runnable theTarget, java.lang.String name)
DNotesThread
object so that it has
target
as its run object, has the specified
name
as its name, and belongs to the thread group referred
to by group
. If group
is
null
and there is a security manager, the group is
determined by the security manager's getThreadGroup
method. If group
is null
and there is not a
security manager, or the security manager's getThreadGroup
method returns null
, the group is set to be the same
ThreadGroup as the thread that is creating the new thread.
If there is a security manager, its checkAccess
method
is called with the ThreadGroup as its argument.
In addition, its
checkPermission
method is called with the
RuntimePermission("enableContextClassLoaderOverride")
permission when invoked directly or indirectly by the constructor of a
subclass which overrides the getContextClassLoader
or
setContextClassLoader
methods. This may result in a
SecurityException.
If the target
argument is not null
,
the run
method of the target
is called when
this thread is started. If the target argument is null
,
this thread's run
method is called when this thread is
started.
The priority of the newly created thread is set equal to the
priority of the thread creating it, that is, the currently running
thread. The method setPriority
may be used to change the
priority to a new value.
The newly created thread is initially marked as being a daemon thread.
group
- the thread group.theTarget
- the object whose run
method is called.name
- the name of the new thread.Thread.Thread(java.lang.ThreadGroup, java.lang.Runnable,
java.lang.String)
Method Detail |
---|
public final void setMonitor(DNotesMonitor theMonitor)
theMonitor
- the monitorDNotesFactory.setMonitor(de.bea.domingo.DNotesMonitor)
protected final void initThread()
initThread()
protected final void termThread()
termThread()
public void runNotes() throws DNotesException
DNotesException
- if any error occurred in running the threadpublic final void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
Runnable.run()
protected final void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- the Exception
raised by this methodObject.finalize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |