tweed.context
Class DefaultContextFactory.DefaultContext

java.lang.Object
  |
  +--tweed.context.DefaultContextFactory.DefaultContext
All Implemented Interfaces:
Context, Contextualized
Enclosing class:
DefaultContextFactory

protected class DefaultContextFactory.DefaultContext
extends java.lang.Object
implements Context

A mutable Context which should not be instantiated from outside the enclosing class or its derivates.


Constructor Summary
protected DefaultContextFactory.DefaultContext()
           
 
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.
protected  void initializeClientSide()
           
 boolean isClientSide()
          Returns if the application is running client-side.
 boolean isServerSide()
          Returns if the application is running server-side.
 void setActionPerformer(ActionPerformer actionPerformer)
           
 void setInvoker(CommandInvoker invoker)
           
 void setLogger(org.apache.avalon.framework.logger.Logger logger)
           
 void setServerSide(boolean serverSide)
           
 void setValidationHub(InputValidationHub validationHub)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultContextFactory.DefaultContext

protected DefaultContextFactory.DefaultContext()
Method Detail

getContext

public Context getContext()
Description copied from interface: Context
Allows to pass directly a Context object instead of a Contextualized. Implementations must return this.

Specified by:
getContext in interface Context

getInvoker

public CommandInvoker getInvoker()
Description copied from interface: Context
Returns the CommandInvoker instance used server-side for executing Command instances on the server.

Specified by:
getInvoker in interface Context
Returns:
a CommandInvoker when called in the client context, null otherwise.

setInvoker

public void setInvoker(CommandInvoker invoker)

isClientSide

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

Specified by:
isClientSide in interface Context
Returns:
true if running client-side, false otherwise.

isServerSide

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

Specified by:
isServerSide in interface Context
Returns:
true if running server-side, false otherwise.

setServerSide

public void setServerSide(boolean serverSide)

getLogger

public org.apache.avalon.framework.logger.Logger getLogger()
Description copied from interface: Context
Returns the base Logger for this context.

Specified by:
getLogger in interface Context
Returns:
a non-null Logger instance.

setLogger

public void setLogger(org.apache.avalon.framework.logger.Logger logger)

getInputValidationHub

public InputValidationHub getInputValidationHub()
Description copied from interface: Context
Returns the ValidationHub that every Binding uses implicitely.

Specified by:
getInputValidationHub in interface Context
Returns:
a non-null InputValidationHub if running client-side, null otherwise.

setValidationHub

public void setValidationHub(InputValidationHub validationHub)

getBus

public EventBus getBus()
Description copied from interface: Context
Returns the event bus for this context.

Specified by:
getBus in interface Context
Returns:
a non-null EventBus instance if running client-side, null otherwise.

getActionPerformer

public ActionPerformer getActionPerformer()
Description copied from interface: Context
Returns the ActionPerformer that processes ContextActions.

Specified by:
getActionPerformer in interface Context
Returns:
a non-null ActionPerformer if running client-side, null otherwise.

setActionPerformer

public void setActionPerformer(ActionPerformer actionPerformer)

initializeClientSide

protected void initializeClientSide()


Copyright © 2003 Laurent Caillette. All Rights Reserved.