Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.seam.contexts
Class BasicContext

    java.lang.Object
      org.jboss.seam.contexts.BasicContext

All Implemented Interfaces:
  Context

Direct Known Subclasses:
  ApplicationContext, EventContext, SessionContext

    public class BasicContext

extends Object
implements Context

A basic implementation of Context that keeps the state in a Map.

Author:
  Gavin King

Constructor Summary
`` | `BasicContext(ScopeType scope)`
`protected` | `BasicContext(ScopeType scope, Map<String,Object> map)`

Method Summary
`void` | `flush()` Force synchronization to the underlying state store.
`Object` | `get(Class clazz)` Get a component instance, by its component name, as determined by the @Name annotation value.
`Object` | `get(String name)` Get a value by name.
`String[]` | `getNames()` Get all names defined in the context.
`ScopeType` | `getType()` Get the scope that this context object is associated with,
`boolean` | `isSet(String name)` Is the value set?
`void` | `remove(String name)` Unset a value.
`void` | `set(String name, Object value)` Set a value.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BasicContext

    public BasicContext(ScopeType scope)

### BasicContext

    protected BasicContext(ScopeType scope,
                           Map<String,Object> map)

Method Detail

### getType

    public ScopeType getType()

  Description copied from interface: `Context`
  Get the scope that this context object is associated with,

  Specified by:
    `getType` in interface `Context`

### get

    public Object get(Class clazz)

  Description copied from interface: `Context`
  Get a component instance, by its component name, as determined by the @Name annotation value.

  Specified by:
    `get` in interface `Context`

### get

    public Object get(String name)

  Description copied from interface: `Context`
  Get a value by name.

  Specified by:
    `get` in interface `Context`

### getNames

    public String[] getNames()

  Description copied from interface: `Context`
  Get all names defined in the context.

  Specified by:
    `getNames` in interface `Context`

### isSet

    public boolean isSet(String name)

  Description copied from interface: `Context`
  Is the value set?

  Specified by:
    `isSet` in interface `Context`

### remove

    public void remove(String name)

  Description copied from interface: `Context`
  Unset a value.

  Specified by:
    `remove` in interface `Context`

### set

    public void set(String name,
                    Object value)

  Description copied from interface: `Context`
  Set a value.

  Specified by:
    `set` in interface `Context`

### flush

    public void flush()

  Description copied from interface: `Context`
  Force synchronization to the underlying state store. Some implementations of Context "persist" state back to the underlying store synchronously, others asynchronously. This method is usually called by Seam, when necessary.

  Specified by:
    `flush` in interface `Context`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD