jodd.petite.scope
Interface Scope

All Known Implementing Classes:
DefaultScope, ProtoScope, SessionScope, SingletonScope, ThreadLocalScope

public interface Scope

Petite container bean scope. Scopes actually represents wrapper over none, one or many internal bean pools. Which pool is used depends on scopes behaviour and external data.

Scopes are instantiated once on their first usage and stored within one container.


Method Summary
 java.lang.Object lookup(java.lang.String name)
          Lookups for bean name.
 void register(java.lang.String name, java.lang.Object bean)
          Registers the bean within the current scope.
 void remove(java.lang.String name)
          Removes the bean from the scope entirely.
 

Method Detail

lookup

java.lang.Object lookup(java.lang.String name)
Lookups for bean name. It may happens that lookup is performed before the registration, therefore it should returns null if object is not yet registered.


register

void register(java.lang.String name,
              java.lang.Object bean)
Registers the bean within the current scope.


remove

void remove(java.lang.String name)
Removes the bean from the scope entirely.



Copyright © 2003-2010 Jodd Team