Examples of SimpleContext


Examples of com.griddynamics.gridkit.coherence.patterns.benchmark.SimpleContext

   
    Identifier[] contexts = new Identifier[benchmarkParams.getContextCount()];
   
    for(int i = 0; i != benchmarkParams.getContextCount(); ++i)
    {
      contexts[i] = facade.registerContext("ctx-" + i, new SimpleContext("ctx-" + i));
    }
   
    Map<Integer, Integer> workerIDs = new HashMap<Integer, Integer>();
   
    int i = 0;
View Full Code Here

Examples of com.griddynamics.gridkit.coherence.patterns.benchmark.SimpleContext

  @Override
  public void execute(ExecutionEnvironment<SimpleContext> executionEnvironment)
  {
    startExecution();
    // Invoke execution method.
    SimpleContext ctx = executionEnvironment.getContext();
    ctx.touch();
    executionEnvironment.setContext(ctx);
    // Save time information
    finishExecution();
  }
View Full Code Here

Examples of de.odysseus.el.util.SimpleContext

*/
public class JuelTest extends TestCase {

    public void testJuel() throws Exception {
        ExpressionFactory factory = ExpressionFactory.newInstance();
        ELContext context  = new SimpleContext();
        ValueExpression valueExpression = factory.createValueExpression(context, "${123 * 2}", Object.class);
        Object value = valueExpression.getValue(context);

        System.out.println("Found: " + value + " for expression: " + valueExpression);
    }
View Full Code Here

Examples of de.odysseus.el.util.SimpleContext

        return context;
    }

    protected void setVariable(ELContext context, String name, Object value, Class<?> type) {
        ValueExpression valueExpression = getExpressionFactory().createValueExpression(value, type);
        SimpleContext simpleContext = (SimpleContext) context;
        simpleContext.setVariable(name, valueExpression);
    }
View Full Code Here

Examples of de.odysseus.el.util.SimpleContext

    /**
     * Factory method to create the EL context
     */
    protected ELContext createContext() {
        return new SimpleContext();
    }
View Full Code Here

Examples of de.odysseus.el.util.SimpleContext

        properties.setProperty("javax.el.methodInvocations", "true");
    }

    protected void setVariable(ELContext context, String name, Object value, Class<?> type) {
        ValueExpression valueExpression = getExpressionFactory().createValueExpression(value, type);
        SimpleContext simpleContext = (SimpleContext) context;
        simpleContext.setVariable(name, valueExpression);
    }
View Full Code Here

Examples of de.odysseus.el.util.SimpleContext

                add(new MapELResolver(false));
                add(new ResourceBundleELResolver());
                add(new BeanAndMethodELResolver());
            }
        };
        return new SimpleContext(resolver);
    }
View Full Code Here

Examples of de.odysseus.el.util.SimpleContext

*/
public class JuelTest extends TestCase {

    public void testJuel() throws Exception {
        ExpressionFactory factory = new ExpressionFactoryImpl();
        ELContext context  = new SimpleContext();
        ValueExpression valueExpression = factory.createValueExpression(context, "${123 * 2}", Object.class);
        Object value = valueExpression.getValue(context);

        assertEquals("Result is a Long object", 246L, value);
    }
View Full Code Here

Examples of de.odysseus.el.util.SimpleContext

*/
public class JuelTest extends TestCase {

    public void testJuel() throws Exception {
        ExpressionFactory factory = ExpressionFactory.newInstance();
        ELContext context  = new SimpleContext();
        ValueExpression valueExpression = factory.createValueExpression(context, "${123 * 2}", Object.class);
        Object value = valueExpression.getValue(context);

        System.out.println("Found: " + value + " for expression: " + valueExpression);
    }
View Full Code Here

Examples of de.odysseus.el.util.SimpleContext

  SimpleContext context;
  TreeStore store = new TreeStore(new Builder(), null);
 
  @Override
  protected void setUp() throws Exception {
    context = new SimpleContext(new SimpleResolver(new BeanELResolver()));
    context.getELResolver().setValue(context, null, "base", this);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.