Package org.apache.wicket.guice
Class GuiceInjectorHolder
- java.lang.Object
-
- org.apache.wicket.guice.GuiceInjectorHolder
-
- All Implemented Interfaces:
Serializable
,IClusterable
public class GuiceInjectorHolder extends Object implements IClusterable
This is a holder for the Injector. The reason we need a holder is that metadata only supports storing serializable objects but Injector is not. The holder acts as a serializable wrapper for the context. Notice that although holder implements IClusterable it really is not because it has a reference to non-serializable context - but this is ok because metadata objects in application are never serialized.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static MetaDataKey<GuiceInjectorHolder>
INJECTOR_KEY
Metadata key used to store Injector holder in application's metadata
-
Constructor Summary
Constructors Constructor Description GuiceInjectorHolder(com.google.inject.Injector injector)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.inject.Injector
getInjector()
-
-
-
Field Detail
-
INJECTOR_KEY
public static final MetaDataKey<GuiceInjectorHolder> INJECTOR_KEY
Metadata key used to store Injector holder in application's metadata
-
-
Constructor Detail
-
GuiceInjectorHolder
public GuiceInjectorHolder(com.google.inject.Injector injector)
Constructor- Parameters:
injector
-
-
-
Method Detail
-
getInjector
public com.google.inject.Injector getInjector()
- Returns:
- the context
-
-