Managed Singletons for Guice

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).

License

License

GroupId

GroupId

com.jolira
ArtifactId

ArtifactId

managed
Last Version

Last Version

3.0.5
Release Date

Release Date

Type

Type

jar
Description

Description

Managed Singletons for Guice
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).
Project URL

Project URL

http://code.google.com/p/jolira-tools/wiki/guice/managed

Download managed

How to add to project

<!-- https://jarcasting.com/artifacts/com.jolira/managed/ -->
<dependency>
    <groupId>com.jolira</groupId>
    <artifactId>managed</artifactId>
    <version>3.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/com.jolira/managed/
implementation 'com.jolira:managed:3.0.5'
// https://jarcasting.com/artifacts/com.jolira/managed/
implementation ("com.jolira:managed:3.0.5")
'com.jolira:managed:jar:3.0.5'
<dependency org="com.jolira" name="managed" rev="3.0.5">
  <artifact name="managed" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.jolira', module='managed', version='3.0.5')
)
libraryDependencies += "com.jolira" % "managed" % "3.0.5"
[com.jolira/managed "3.0.5"]

Dependencies

compile (3)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.6.1
com.google.inject : guice jar 3.0
com.google.inject.extensions : guice-multibindings jar 3.0

test (1)

Group / Artifact Type Version
junit : junit jar 4.10

Project Modules

There are no modules declared in this project.

Google Guice

Extensions for Guice.

Plugins

A very simple plugins mechanism that automatically discovers plugins by looking for META-INF/services/com.google.inject.Module file. This module file contains the name of the class or classes that should be added when constructing the injector.

Every JAR used with this mechanism should contains such a META-INF/services/com.google.inject.Module file. To create the injector, create the PluginManager, which discovers all META-INF/services/com.google.inject.Module files in the search path, instantiates all the modules identified there and creates an Injector using the modules.

Managed

Singletons are great, but sometimes it is great to get rid of them. ManagedSingletons are exactly for that. They exist until they are reset by the SingletonManager.

com.jolira

Jolira

Versions

Version
3.0.5
3.0.2
3.0.1