All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softicar.platform.common.core.thread.IRunnableThread Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
package com.softicar.platform.common.core.thread;

/**
 * Represents a {@link Thread} that is created from a given {@link Runnable}.
 *
 * @author Alexander Schmidt
 * @author Oliver Richers
 */
public interface IRunnableThread {

	/**
	 * Returns the {@link Runnable} from which the {@link Thread} is created.
	 *
	 * @return the {@link Runnable} (never null)
	 */
	R getRunnable();

	/**
	 * Starts the {@link Thread} created from the {@link Runnable}.
	 * 

* May only be called once. */ void start(); /** * Interrupts the {@link Thread} created from the {@link Runnable}. */ void interrupt(); /** * Kills the {@link Thread} created from the {@link Runnable}. *

* Repeatedly sends interrupts as long as either the {@link Thread} is * terminated, or a timeout is encountered. * * @return true if the {@link Thread} was successfully killed; * false otherwise */ boolean kill(); /** * Determines whether the {@link Thread} created from the {@link Runnable} * has been terminated. * * @return true if the {@link Thread} has been terminated; * false otherwise */ boolean isTerminated(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy