tweed.context
Interface Context

All Superinterfaces:
Contextualized
All Known Implementing Classes:
DefaultContextFactory.DefaultContext

public interface Context
extends Contextualized

Describes an execution context. An instance of this class acts like a set of global variables, but in a restricted scope. A Context implementation must respect following rules:

Version:
$Id$
Author:
Laurent Caillette
See Also:
DefaultContextFactory, ContextPatcher

Method Summary
 ActionPerformer getActionPerformer()
          Returns the ActionPerformer that processes ContextActions.
 EventBus getBus()
          Returns the event bus for this context.
 Context getContext()
          Allows to pass directly a Context object instead of a Contextualized.
 InputValidationHub getInputValidationHub()
          Returns the ValidationHub that every Binding uses implicitely.
 CommandInvoker getInvoker()
          Returns the CommandInvoker instance used server-side for executing Command instances on the server.
 org.apache.avalon.framework.logger.Logger getLogger()
          Returns the base Logger for this context.
 boolean isClientSide()
          Returns if the application is running client-side.
 boolean isServerSide()
          Returns if the application is running server-side.
 

Method Detail

getContext

public Context getContext()
Allows to pass directly a Context object instead of a Contextualized. Implementations must return this.

Specified by:
getContext in interface Contextualized

getLogger

public org.apache.avalon.framework.logger.Logger getLogger()
Returns the base Logger for this context.

Returns:
a non-null Logger instance.

getInvoker

public CommandInvoker getInvoker()
Returns the CommandInvoker instance used server-side for executing Command instances on the server.

Returns:
a CommandInvoker when called in the client context, null otherwise.

isClientSide

public boolean isClientSide()
Returns if the application is running client-side. It is guaranteed that the isServerSide() method will return the negation of isClientSide().

Returns:
true if running client-side, false otherwise.

isServerSide

public boolean isServerSide()
Returns if the application is running server-side. It is guaranteed that the isClientSide() method will return the negation of isServerSide().

Returns:
true if running server-side, false otherwise.

getBus

public EventBus getBus()
Returns the event bus for this context.

Returns:
a non-null EventBus instance if running client-side, null otherwise.

getInputValidationHub

public InputValidationHub getInputValidationHub()
Returns the ValidationHub that every Binding uses implicitely.

Returns:
a non-null InputValidationHub if running client-side, null otherwise.

getActionPerformer

public ActionPerformer getActionPerformer()
Returns the ActionPerformer that processes ContextActions.

Returns:
a non-null ActionPerformer if running client-side, null otherwise.


Copyright © 2003 Laurent Caillette. All Rights Reserved.