Keel 2.1RC2

org.apache.avalon.fortress.impl.lookup.test
Class TestContainer

java.lang.Object
  extended byorg.apache.avalon.fortress.impl.lookup.test.TestContainer
All Implemented Interfaces:
Container

class TestContainer
extends java.lang.Object
implements Container


Field Summary
private  TestComponentHandler m_component
           
private  java.lang.Object m_hint
           
private  java.lang.String m_key
           
private  FortressServiceSelector m_selector
           
 
Fields inherited from interface org.apache.avalon.fortress.Container
ROLE
 
Constructor Summary
TestContainer()
           
 
Method Summary
private  boolean exists(java.lang.String key, java.lang.Object hint)
           
 java.lang.Object get(java.lang.String key, java.lang.Object hint)
          This is the method that the ContainerComponentManager and Selector use to gain access to the ComponentHandlers and ComponentSelectors.
 boolean has(java.lang.String key, java.lang.Object hint)
          This is the method that the ContainerComponentManager and Selector use to gain access to the ComponentHandlers and ComponentSelectors.
 void setExpectedHint(java.lang.Object hint)
           
 void setExpectedKey(java.lang.String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_key

private java.lang.String m_key

m_hint

private java.lang.Object m_hint

m_component

private TestComponentHandler m_component

m_selector

private FortressServiceSelector m_selector
Constructor Detail

TestContainer

public TestContainer()
Method Detail

setExpectedKey

public void setExpectedKey(java.lang.String key)

setExpectedHint

public void setExpectedHint(java.lang.Object hint)

get

public java.lang.Object get(java.lang.String key,
                            java.lang.Object hint)
                     throws ServiceException
Description copied from interface: Container
This is the method that the ContainerComponentManager and Selector use to gain access to the ComponentHandlers and ComponentSelectors. The actual access of the ComponentHandler is delegated to the Container.

Specified by:
get in interface Container
Parameters:
key - The role we intend to access a Component for.
hint - The hint that we use as a qualifier (note: if null, the default implementation is returned).
Returns:
Object a reference to the ComponentHandler or ComponentSelector for the role/hint combo.
Throws:
ServiceException - if the container cannot get the component

has

public boolean has(java.lang.String key,
                   java.lang.Object hint)
Description copied from interface: Container
This is the method that the ContainerComponentManager and Selector use to gain access to the ComponentHandlers and ComponentSelectors. The actual access of the ComponentHandler is delegated to the Container.

Specified by:
has in interface Container
Parameters:
key - The role we intend to access a Component for.
hint - The hint that we use as a qualifier (note: if null, the default implementation is returned).
Returns:
true if a reference to the role exists.

exists

private boolean exists(java.lang.String key,
                       java.lang.Object hint)

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.