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

com.jwebmp.guicedinjection.threading.PostStartupRunnable Maven / Gradle / Ivy

Go to download

Guice Injection allows you to access multiple Guice Binders and Modules across separate archives. Allowing you to configure your applications with injection from multiple dependancies. Servlets, EJB's, and Stand-Alone is supported. Requires JDK 8 or 10.

There is a newer version: 0.66.0.1
Show newest version
package com.jwebmp.guicedinjection.threading;

import com.jwebmp.guicedinjection.interfaces.IGuicePostStartup;

import java.io.Serializable;
import java.util.concurrent.Callable;

/**
 * A thread type future or current to startup asynchronously during post startup execution.
 * Executed internally.
 */
public class PostStartupRunnable
		implements Runnable, Callable, Serializable
{
	private static final long serialVersionUID = 1L;

	private transient IGuicePostStartup startup;

	public PostStartupRunnable(IGuicePostStartup startup)
	{
		this.startup = startup;
	}

	@Override
	public PostStartupRunnable call()
	{
		run();
		return this;
	}

	@Override
	public void run()
	{
		startup.postLoad();
		startup = null;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy