Package io.milton.context
Class RootContext
- java.lang.Object
-
- io.milton.context.Context
-
- io.milton.context.RootContext
-
- All Implemented Interfaces:
Contextual,Closeable,AutoCloseable
public class RootContext extends Context implements Closeable
-
-
Field Summary
-
Fields inherited from class io.milton.context.Context
itemByClass, itemByName
-
-
Constructor Summary
Constructors Constructor Description RootContext()RootContext(FactoryCatalog factoryCatalog)RootContext(FactoryCatalog factoryCatalog, List<Object> initialContents)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Same as shutdown<T> Texecute(Executable<T> exec)voidexecute(Executable2 exec)Execute without any return valueprotected RegistrationgetRegistration(Class c)Throws an exception if returning nullprotected RegistrationgetRegistration(String id)voidput(Object... beans)voidsetRootContextLocator(RootContextLocator loc)This weird little guy is to allow us to set this root context into a locator which was defined in spring config before this one.voidshutdown()
-
-
-
Constructor Detail
-
RootContext
public RootContext()
-
RootContext
public RootContext(FactoryCatalog factoryCatalog)
-
RootContext
public RootContext(FactoryCatalog factoryCatalog, List<Object> initialContents)
-
-
Method Detail
-
put
public void put(Object... beans)
-
execute
public void execute(Executable2 exec)
Execute without any return value
-
execute
public <T> T execute(Executable<T> exec)
-
getRegistration
protected Registration getRegistration(Class c) throws IllegalArgumentException
Throws an exception if returning null- Overrides:
getRegistrationin classContext- Throws:
IllegalArgumentException
-
getRegistration
protected Registration getRegistration(String id)
- Overrides:
getRegistrationin classContext
-
shutdown
public void shutdown()
-
setRootContextLocator
public void setRootContextLocator(RootContextLocator loc)
This weird little guy is to allow us to set this root context into a locator which was defined in spring config before this one.- Parameters:
loc-
-
close
public void close()
Same as shutdown- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-