net.israfil.micro.container
Interface AutoWiringAdaptableContainer

All Superinterfaces:
Container
All Known Implementing Classes:
DefaultAutoWiringAdaptableContainer

public interface AutoWiringAdaptableContainer
extends Container

A Container that uses an AutoWiringAdapter to ensure that components can be created appropriately with their dependencies satisfied automatically.


Method Summary
 void registerType(java.lang.Object key, AutoWiringAdapter componentAdapter)
          Register a component.
 void registerType(java.lang.Object key, java.lang.Class componentAdapter)
          Register an independent component.
 void start()
          Begin the lifecycle of the container, after which components should be accessible.
 
Methods inherited from interface net.israfil.micro.container.Container
getComponent, hasComponent, isRunning
 

Method Detail

start

void start()
Description copied from interface: Container
Begin the lifecycle of the container, after which components should be accessible. Implementors should stop any component registration as of the start() call. Subsequent start() calls should be ignored.

Specified by:
start in interface Container

registerType

void registerType(java.lang.Object key,
                  AutoWiringAdapter componentAdapter)
Register a component. The component's class must satisfy the test Injectable.class.isAssignableFrom(type); to ensure that the provided component implements the lifecycle mechanisms necessary to auto-wire.


registerType

void registerType(java.lang.Object key,
                  java.lang.Class componentAdapter)
Register an independent component. This is a convenience registry method for those components without dependencies, and which have a default constructor. Only classes which fit these criteria should be used in this method.



Copyright © 2008. All Rights Reserved.