ContextAware (Velocity 1.7 API)
Keywords: org.apache.velocity.util.ContextAware interface

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.apache.velocity.util
Interface ContextAware

All Known Implementing Classes:
  IncludeNotFound

public interface ContextAware

Event handlers implementing this interface will automatically have the method setContext called before each event. This allows the event handler to use information in the latest context when responding to the event.

Important Note: Only local event handlers attached to the context (as opposed to global event handlers initialized in the velocity.properties file) should implement ContextAware. Since global event handlers are singletons individual requests will not be able to count on the correct context being loaded before a request.

Since:
  1.5
Version:
  $Id: ContextAware.java 685685 2008-08-13 21:43:27Z nbubna $
Author:
  Will Glass-Husain

Method Summary
`void` | `setContext(Context context)` Initialize the EventHandler.

Method Detail

### setContext

    public void setContext(Context context)

  Initialize the EventHandler.

  Parameters:
    `context` -

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

Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.