org.jicarilla.container
Class DefaultKeyRelayingContainer

java.lang.Object
  extended byorg.jicarilla.container.DefaultContainer
      extended byorg.jicarilla.container.DefaultKeyRelayingContainer
All Implemented Interfaces:
Container, KeyRelayingContainer, ResolverProvider

public class DefaultKeyRelayingContainer
extends DefaultContainer
implements KeyRelayingContainer

Version:
$Id: DefaultKeyRelayingContainer.java,v 1.5 2004/01/08 17:06:11 lsimons Exp $
Author:
Leo Simons

Nested Class Summary
protected  class DefaultKeyRelayingContainer.DefaultKeyRelayingCallback
           
 
Nested classes inherited from class org.jicarilla.container.DefaultContainer
DefaultContainer.DefaultResolverCallback
 
Field Summary
 
Fields inherited from class org.jicarilla.container.DefaultContainer
m_instanceToAdapterMap, m_resolver, m_switch
 
Constructor Summary
DefaultKeyRelayingContainer()
           
DefaultKeyRelayingContainer(Resolver resolver)
           
DefaultKeyRelayingContainer(Resolver resolver, Switch switcher)
           
 
Method Summary
 KeyRelayingContainer registerAdapter(java.lang.Object key, KeyAwareAdapter adapter)
          Add a new KeyAwareAdapter to this container.
 KeyRelayingContainer registerAdapter(Selector selector, KeyAwareAdapter adapter)
          Add a new KeyAwareAdapter to this container.
 
Methods inherited from class org.jicarilla.container.DefaultContainer
doAddAdapter, doAddAdapter, getInstanceToAdapterMap, getResolver, getSwitch, registerAdapter, registerAdapter, setInstanceToAdapterMap, setResolver, setSwitch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jicarilla.container.ResolverProvider
getResolver
 

Constructor Detail

DefaultKeyRelayingContainer

public DefaultKeyRelayingContainer()

DefaultKeyRelayingContainer

public DefaultKeyRelayingContainer(Resolver resolver)

DefaultKeyRelayingContainer

public DefaultKeyRelayingContainer(Resolver resolver,
                                   Switch switcher)
Method Detail

registerAdapter

public KeyRelayingContainer registerAdapter(Selector selector,
                                            KeyAwareAdapter adapter)
Description copied from interface: KeyRelayingContainer
Add a new KeyAwareAdapter to this container.

Specified by:
registerAdapter in interface KeyRelayingContainer
Parameters:
selector - the Selector that will be used to test whether the provided adapter can be used to provide an instance for a key requested from the Resolver returned from this container its ResolverProvider.getResolver() method.
adapter - a KeyAwareAdapter that will be used to help this container fulfill its ResolverProvider contract.
Returns:
this container.

registerAdapter

public KeyRelayingContainer registerAdapter(java.lang.Object key,
                                            KeyAwareAdapter adapter)
Description copied from interface: KeyRelayingContainer
Add a new KeyAwareAdapter to this container.

Specified by:
registerAdapter in interface KeyRelayingContainer
Parameters:
key - the criterion that will be used to test whether the provided adapter can be used to provide an instance for a requested key.
adapter - a KeyAwareAdapter that will be used to help this container fulfill its ResolverProvider contract.
Returns:
this container.


Copyright © 2004 Leo Simons. All Rights Reserved.