ElementScripted.java :  » Web-Framework » rife-1.6.1 » com » uwyn » rife » engine » Java Open Source

Java Open Source » Web Framework » rife 1.6.1 
rife 1.6.1 » com » uwyn » rife » engine » ElementScripted.java
/*
 * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
 * Distributed under the terms of either:
 * - the common development and distribution license (CDDL), v1.0; or
 * - the GNU Lesser General Public License, v2.1 or later
 * $Id: ElementScripted.java 3634 2007-01-08 21:42:24Z gbevin $
 */
package com.uwyn.rife.engine;

import com.uwyn.rife.engine.exceptions.EngineException;

/**
 * The <code>ElementScripted</code> class provides a bridge between
 * scripting engines and the element backend. You should never have to deal
 * with this class directly.
 *
 * @author Geert Bevin (gbevin[remove] at uwyn dot com)
 * @version $Revision: 3634 $
 * @since 1.0
 */
public class ElementScripted extends Element
{
  private ScriptedEngine  mEngine = null;

  /**
   * Creates a new <code>ElementScripted</code> instance for a particular
   * scripting engine.
   *
   * @param engine the scripting engine that this element has to be linked to
   *
   * @exception EngineException when an unexpected error occurred while linking
   * the scripted element to the engine
   */
  public ElementScripted(ScriptedEngine engine)
  throws EngineException
  {
    super();
    
    mEngine = engine;
    engine.setElement(this);
  }
  
  public void processElement()
  {
    mEngine.processElement();
  }
  
  public boolean childTriggered(String name, String[] values)
  {
    return mEngine.childTriggered(name, values);
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.