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

com.google.code.joliratools.plugins.ManagedSingleton Maven / Gradle / Ivy

Go to download

A @ManageSingleton that works much like @Singleton, but can be reset to force recreation of instances. By implementing the ManagedService interface and registering it using a MultiBinder, the startup process can be manged using different run levels (much like services on the OS).

The newest version!
/**
 * Copyright (c) 2010 jolira. All rights reserved. This program and the accompanying materials are made available under
 * the terms of the GNU Public License 2.0 which is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 */

package com.google.code.joliratools.plugins;

import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import com.google.inject.ScopeAnnotation;
import com.google.inject.Singleton;

/**
 * Apply this to implementation classes when you want only one instance to be reused for all injections for that
 * binding, but if you want to be able to reset the instance during the lifetime of the app.
 * 
 * @deprecated use {@link com}
 * @author Joachim F. Kainz
 * @date Jul 25, 2010 5:16:26 PM
 * @since 2.0.4
 * @see Singleton
 */
@Target({ TYPE })
@Retention(RUNTIME)
@ScopeAnnotation
@Documented
@Deprecated
public @interface ManagedSingleton {
    // nothing
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy