SAP NetWeaver '04

com.sapportals.wcm.util.factories
Class ThreadUtils

[contained in: com.sap.netweaver.bc.util.par - bc.util.public_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.util.factories.ThreadUtils

public class ThreadUtils
extends java.lang.Object

Some tools for starting threads.

Copyright (c) SAP AG 2001-2002


Constructor Summary
ThreadUtils()
           
 
Method Summary
static java.lang.Thread daemonize(java.lang.Runnable task)
          Create a new daemon thread for a Runnable .
static java.lang.Thread daemonize(java.lang.Runnable task, java.lang.String name)
          Create a new daemon thread for a Runnable .
static java.lang.Thread daemonizeFixedTimer(java.lang.Runnable task, java.util.Date start, long interval)
          Create a new daemon thread with a fixed timer for a Runnable .
static java.lang.Thread daemonizeFixedTimer(java.lang.Runnable task, java.util.Date start, long interval, java.lang.String name)
          Create a new daemon thread with a fixed timer for a Runnable .
static java.lang.Thread daemonizeFixedTimer(java.lang.Runnable task, long delay, long interval)
          Create a new daemon thread with a fixed timer for a Runnable .
static java.lang.Thread daemonizeFixedTimer(java.lang.Runnable task, long delay, long interval, java.lang.String name)
          Create a new daemon thread with a fixed timer for a Runnable .
static java.lang.ThreadGroup getRootThreadGroup()
          Get the root thread group (the system thread group).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadUtils

public ThreadUtils()
Method Detail

getRootThreadGroup

public static java.lang.ThreadGroup getRootThreadGroup()
Get the root thread group (the system thread group).
Returns:
the ThreadGroup at top level.

daemonize

public static java.lang.Thread daemonize(java.lang.Runnable task)
Create a new daemon thread for a Runnable .
Parameters:
task - the Runnable to execute by the task.
Returns:
the Thread , marked as daemon and already started.

daemonize

public static java.lang.Thread daemonize(java.lang.Runnable task,
                                         java.lang.String name)
Create a new daemon thread for a Runnable .
Parameters:
task - the Runnable to execute by the task.
name - a String with the name of the thread.
Returns:
the Thread , marked as daemon and already started.

daemonizeFixedTimer

public static java.lang.Thread daemonizeFixedTimer(java.lang.Runnable task,
                                                   java.util.Date start,
                                                   long interval)
Create a new daemon thread with a fixed timer for a Runnable .
Parameters:
task - the Runnable to execute by the task.
start - a Date with the start date for the timer.
interval - a long with the delay between each call to the task in milliseconds.
Returns:
the Thread , marked as daemon and already started.

daemonizeFixedTimer

public static java.lang.Thread daemonizeFixedTimer(java.lang.Runnable task,
                                                   java.util.Date start,
                                                   long interval,
                                                   java.lang.String name)
Create a new daemon thread with a fixed timer for a Runnable .
Parameters:
task - the Runnable to execute by the task.
start - a Date with the start date for the timer.
interval - a long with the delay between each call to the task in milliseconds.
name - a String with the name of the thread.
Returns:
the Thread , marked as daemon and already started.

daemonizeFixedTimer

public static java.lang.Thread daemonizeFixedTimer(java.lang.Runnable task,
                                                   long delay,
                                                   long interval)
Create a new daemon thread with a fixed timer for a Runnable .
Parameters:
task - the Runnable to execute by the task.
delay - a long with the delay for the first call to the task in milliseconds.
interval - a long with the delay between each call to the task in milliseconds.
Returns:
the Thread , marked as daemon and already started.

daemonizeFixedTimer

public static java.lang.Thread daemonizeFixedTimer(java.lang.Runnable task,
                                                   long delay,
                                                   long interval,
                                                   java.lang.String name)
Create a new daemon thread with a fixed timer for a Runnable .
Parameters:
task - the Runnable to execute by the task.
delay - a long with the delay for the first call to the task in milliseconds.
interval - a long with the delay between each call to the task in milliseconds.
name - a String with the name of the thread.
Returns:
the Thread , marked as daemon and already started.

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.